-
Notifications
You must be signed in to change notification settings - Fork 28k
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-3911] [SQL] HiveSimpleUdf can not be optimized in constant folding #2771
[SPARK-3911] [SQL] HiveSimpleUdf can not be optimized in constant folding #2771
Conversation
Can one of the admins verify this patch? |
QA tests have started for PR 2771 at commit
|
QA tests have finished for PR 2771 at commit
|
Test PASSed. |
@transient | ||
protected lazy val isUDFDeterministic = { | ||
val udfType = function.getClass().getAnnotation(classOf[HiveUDFType]) | ||
(udfType != null && udfType.deterministic()) |
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.
Nit: redundant parenthesis.
This LGTM. Would you mind to add some tests? Probably in |
cc3091e
to
405d9cf
Compare
Thank you @liancheng , I've updated the code. |
test this please. |
ok to test |
QA tests have started for PR 2771 at commit
|
QA tests have finished for PR 2771 at commit
|
Test FAILed. |
retest this please |
QA tests have started for PR 2771 at commit
|
QA tests have finished for PR 2771 at commit
|
Test PASSed. |
@marmbrus @liancheng any more comments on this? |
@@ -74,4 +76,30 @@ class QueryTest extends FunSuite { | |||
""".stripMargin) | |||
} | |||
} | |||
|
|||
// The following copy is copied from org.apache.spark.sql.catalyst.plans.PlanTest |
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.
How about making QueryTest
inherit from PlanTest
instead? Just like what we did in another PlanTest
in sql/core
.
Test build #445 has started for PR 2771 at commit
|
Test build #445 timed out for PR 2771 at commit |
Test build #457 has started for PR 2771 at commit
|
Test build #461 has started for PR 2771 at commit
|
Test build #457 has finished for PR 2771 at commit
|
Test build #461 timed out for PR 2771 at commit |
405d9cf
to
1379c73
Compare
test this please. |
Test build #22280 has started for PR 2771 at commit
|
Test build #22280 has finished for PR 2771 at commit
|
Test PASSed. |
@marmbrus @liancheng any more comment on this? |
Thanks! Merged to master. |
outputs:
After patching this PR it outputs