GitHub user tanejagagan opened a pull request: https://github.com/apache/spark/pull/16497
[SPARK-19118] [SQL] Percentile support for frequency distribution table ## What changes were proposed in this pull request? I have a frequency distribution table with following entries Age, No of person 21, 10 22, 15 23, 18 .. .. 30, 14 Moreover it is common to have data in frequency distribution format to further calculate Percentile, Median. With current implementation It would be very difficult and complex to find the percentile. Therefore i am proposing enhancement to current Percentile and Approx Percentile implementation to take frequency distribution column into consideration ## How was this patch tested? 1) Enhanced /sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/aggregate/PercentileSuite.scala to cover the additional functionality 2) Run some performance benchmark test with 20 million row in local environment and did not see any performance degradation Please review http://spark.apache.org/contributing.html before opening a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tanejagagan/spark branch-18940 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16497.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16497 ---- commit c638fbc45047a250f7e41ad589e3f144d911e441 Author: gagan taneja <tanejagagan@gagans-macbook-pro.local> Date: 2017-01-07T18:03:27Z [SPARK-18940][SQL] Percentile and approximate percentile support for frequency distribution table commit 3740a0c7785e8480b889c8a99f639906d8a0d5a1 Author: gagan taneja <tanejagagan@gagans-macbook-pro.local> Date: 2017-01-07T18:03:27Z [SPARK-18940][SQL] Percentile and approximate percentile support for frequency distribution table commit 28cdb6652fe5c0953a749b9468548edfc9d42067 Author: gagan taneja <tanejagagan@gagans-macbook-pro.local> Date: 2017-01-07T18:23:47Z Merge branch 'branch-18940' of https://github.com/tanejagagan/spark into branch-18940 ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org