Skip to content

Conversation

@liancheng
Copy link
Contributor

@liancheng liancheng commented Mar 5, 2017

What changes were proposed in this pull request?

This PR adds a new Once analysis rule batch consists of a single analysis rule LookupFunctions that performs simple existence check over UnresolvedFunctions without actually resolving them.

The benefit of this rule is that it doesn't require function arguments to be resolved first and therefore doesn't rely on relation resolution, which may incur potentially expensive partition/schema discovery cost.

Please refer to SPARK-19737 for more details about the motivation.

How was this patch tested?

New test case added in AnalysisErrorSuite.

@liancheng
Copy link
Contributor Author

cc @cloud-fan @rxin

@SparkQA
Copy link

SparkQA commented Mar 5, 2017

Test build #73923 has finished for PR 17168 at commit c9da94c.

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

@cloud-fan
Copy link
Contributor

shall we refactor the way we resolve functions? we should get the function builder by name, then resolve all the children and build the function expression.

@liancheng liancheng force-pushed the spark-19737-lookup-functions branch from c9da94c to 393b689 Compare March 6, 2017 08:11
@liancheng
Copy link
Contributor Author

@cloud-fan I'm afraid that's even more complicated an approach since you'll need to make function builders, which are now simply regular Scala functions, into unresolved expressions.

@liancheng liancheng force-pushed the spark-19737-lookup-functions branch from 393b689 to 8a8a552 Compare March 6, 2017 08:15
@cloud-fan
Copy link
Contributor

LGTM

@SparkQA
Copy link

SparkQA commented Mar 6, 2017

Test build #73980 has finished for PR 17168 at commit 393b689.

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

@SparkQA
Copy link

SparkQA commented Mar 6, 2017

Test build #73982 has finished for PR 17168 at commit 8a8a552.

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

@liancheng
Copy link
Contributor Author

Thanks for the review! Merging to master.

@asfgit asfgit closed this in 339b53a Mar 6, 2017
@liancheng liancheng deleted the spark-19737-lookup-functions branch March 13, 2017 17:18
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.

3 participants