You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Zhenhua Wang (JIRA)" <ji...@apache.org> on 2016/10/26 06:57:58 UTC
[jira] [Created] (SPARK-18111) Wrong ApproximatePercentile answer
when multiple records have the minimum value
Zhenhua Wang created SPARK-18111:
------------------------------------
Summary: Wrong ApproximatePercentile answer when multiple records have the minimum value
Key: SPARK-18111
URL: https://issues.apache.org/jira/browse/SPARK-18111
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.0.1
Reporter: Zhenhua Wang
When multiple records have the minimum value, the answer of ApproximatePercentile is wrong. e.g:
0: jdbc:hive2://localhost:10000> select key from src2;
+------+--+
| key |
+------+--+
| 1 |
| 1 |
| 2 |
| 2 |
+------+--+
4 rows selected (0.185 seconds)
0: jdbc:hive2://localhost:10000> select percentile_approx(key, array(0.5)) from src2;
+------------------------------------------------------------+--+
| percentile_approx(CAST(key AS DOUBLE), array(0.5), 10000) |
+------------------------------------------------------------+--+
| [2.0] |
+------------------------------------------------------------+--+
1 row selected (0.292 seconds)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org