Skip to content

Conversation

@rxin
Copy link
Contributor

@rxin rxin commented Jun 28, 2016

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.

// 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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh.

@SparkQA
Copy link

SparkQA commented Jun 28, 2016

Test build #61358 has finished for PR 13939 at commit ef5db42.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin rxin changed the title [SPARK-16248][SQL] Whitelist the list of Hive fallback functions - WIP [SPARK-16248][SQL] Whitelist the list of Hive fallback functions Jun 28, 2016
@SparkQA
Copy link

SparkQA commented Jun 28, 2016

Test build #61365 has finished for PR 13939 at commit 2639644.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yhuai
Copy link
Contributor

yhuai commented Jun 28, 2016

test this please

@SparkQA
Copy link

SparkQA commented Jun 28, 2016

Test build #61386 has finished for PR 13939 at commit 2639644.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

// built-in function.
// Hive is case insensitive.
val functionName = funcName.unquotedString.toLowerCase
if (!hiveFunctions.contains(functionName)) {
Copy link
Contributor

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?

@marmbrus
Copy link
Contributor

LGTM

@SparkQA
Copy link

SparkQA commented Jun 29, 2016

Test build #61418 has finished for PR 13939 at commit eaef9c5.

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

@SparkQA
Copy link

SparkQA commented Jun 29, 2016

Test build #61426 has finished for PR 13939 at commit 251b484.

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

@rxin
Copy link
Contributor Author

rxin commented Jun 29, 2016

Merging in master/2.0.
Thanks!

asfgit pushed a commit that referenced this pull request Jun 29, 2016
## 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>
@asfgit asfgit closed this in 363bced Jun 29, 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

Development

Successfully merging this pull request may close these issues.

5 participants