Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-18527][SQL] Convert decimal array to double array double for Hive UDAFPercentile #16034

Closed
wants to merge 1 commit into from

Conversation

hvanhovell
Copy link
Contributor

@hvanhovell hvanhovell commented Nov 28, 2016

What changes were proposed in this pull request?

Hive UDAFPercentile takes a double or an array of doubles as its second argument. Spark typically passes a decimal or an array of decimals. This will causes a failure during function lookup for the percentile function.

We added a stop-gap measure in #13930 for doubles, by retrying the lookup with all decimal arguments casted to doubles. This PR extends this approach by adding the same logic for arrays of decimals.

Note that this is a temporary measure until #14136 is merged.

How was this patch tested?

Added a test to HiveUDFSuite

@SparkQA
Copy link

SparkQA commented Nov 28, 2016

Test build #69243 has finished for PR 16034 at commit 0db2460.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

We have merged the percentile PR. So this does not need to be added to branch-2.1. branch-2.0 still has this problems, should we add it there? cc @rxin @yhuai

@rxin
Copy link
Contributor

rxin commented Nov 28, 2016

I'm ok not fixing this for branch-2.0.

@hvanhovell
Copy link
Contributor Author

closing :)

@hvanhovell hvanhovell closed this Nov 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants