You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by fabboe <gi...@git.apache.org> on 2016/11/18 16:03:43 UTC
[GitHub] spark pull request #13930: [SPARK-16228][SQL] HiveSessionCatalog should retu...
Github user fabboe commented on a diff in the pull request:
https://github.com/apache/spark/pull/13930#discussion_r88684273
--- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala ---
@@ -142,6 +142,13 @@ class HiveUDFSuite extends QueryTest with TestHiveSingleton with SQLTestUtils {
sql("SELECT array(max(key), max(key)) FROM src").collect().toSeq)
}
+ test("SPARK-16228 Percentile needs explicit cast to double") {
+ sql("select percentile(value, cast(0.5 as double)) from values 1,2,3 T(value)")
+ sql("select percentile_approx(value, cast(0.5 as double)) from values 1.0,2.0,3.0 T(value)")
+ sql("select percentile(value, 0.5) from values 1,2,3 T(value)")
+ sql("select percentile_approx(value, 0.5) from values 1.0,2.0,3.0 T(value)")
--- End diff --
Doesn't cover all interfaces of `percentile`. E.g. Missing the case
```
sql("select percentile(value, array(0.5,0.99)) from values 1,2,3 T(value)")
```
still throws the seen error as outlined in https://issues.apache.org/jira/browse/SPARK-16228?focusedCommentId=15673869&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15673869
Should I report as bug? Thanks.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org