-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-16248][SQL] Whitelist the list of Hive fallback functions #13939
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
Conversation
| // regexp, sentences, stack, std, str_to_map, windowingtablefunction, xpath, xpath_boolean, | ||
| // xpath_double, xpath_float, xpath_int, xpath_long, xpath_number, | ||
| // xpath_short, and xpath_string. | ||
| private val hiveFunctions = Seq("percentile", "percentile_approx") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh.
|
Test build #61358 has finished for PR 13939 at commit
|
|
Test build #61365 has finished for PR 13939 at commit
|
|
test this please |
|
Test build #61386 has finished for PR 13939 at commit
|
| // built-in function. | ||
| // Hive is case insensitive. | ||
| val functionName = funcName.unquotedString.toLowerCase | ||
| if (!hiveFunctions.contains(functionName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a TODO above that can be removed?
|
LGTM |
|
Test build #61418 has finished for PR 13939 at commit
|
|
Test build #61426 has finished for PR 13939 at commit
|
|
Merging in master/2.0. |
## What changes were proposed in this pull request? This patch removes the blind fallback into Hive for functions. Instead, it creates a whitelist and adds only a small number of functions to the whitelist, i.e. the ones we intend to support in the long run in Spark. ## How was this patch tested? Updated tests to reflect the change. Author: Reynold Xin <rxin@databricks.com> Closes #13939 from rxin/hive-whitelist. (cherry picked from commit 363bced) Signed-off-by: Reynold Xin <rxin@databricks.com>
What changes were proposed in this pull request?
This patch removes the blind fallback into Hive for functions. Instead, it creates a whitelist and adds only a small number of functions to the whitelist, i.e. the ones we intend to support in the long run in Spark.
How was this patch tested?
Updated tests to reflect the change.