[ https://issues.apache.org/jira/browse/SPARK-22179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16194680#comment-16194680 ]
Zhenhua Wang commented on SPARK-22179: -------------------------------------- [~srowen] Yes, I planned to close this after the new issue is resolved :) > percentile_approx should choose the first element if it already reaches the > percentage > -------------------------------------------------------------------------------------- > > Key: SPARK-22179 > URL: https://issues.apache.org/jira/browse/SPARK-22179 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.3.0 > Reporter: Zhenhua Wang > > percentile_approx should choose the first element if it already reaches the > percentage. > For example, given input data 1 to 10, if a user queries 10% (or even less) > percentile, it should return 1 (instead of 2), because the first value 1 > already reaches 10%. Currently it returns a wrong answer: 2. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org