Uh oh!
There was an error while loading. Please reload this page.
[SPARK-28321][SQL] 0-args Java UDF should not be called only once - #25108
[SPARK-28321][SQL] 0-args Java UDF should not be called only once#25108HyukjinKwon wants to merge 1 commit into
Conversation
HyukjinKwon
commented
Jul 11, 2019
cc @cloud-fan |
cloud-fan
commented
Jul 11, 2019
good catch! LGTM |
SparkQA
commented
Jul 11, 2019
Test build #107507 has finished for PR 25108 at commit
|
HyukjinKwon
commented
Jul 11, 2019
retest this please |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
This one, I manually tested but didn't add the test just in case we want to add some kind of optimization in the future. We shouldn't do such thing here but in optimizer anyway. Seems like just a mistake.
SparkQA
commented
Jul 11, 2019
Test build #107517 has finished for PR 25108 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Jul 11, 2019
Test build #107529 has finished for PR 25108 at commit
|
srowen
left a comment
There was a problem hiding this comment.
Seems OK, though I don't know enough to really review.
SparkQA
commented
Jul 11, 2019
Test build #107536 has finished for PR 25108 at commit
|
cloud-fan
commented
Jul 12, 2019
thanks, merging to master! |
## What changes were proposed in this pull request? 0-args Java UDF alone calls the function even before making it as an expression. It causes that the function always returns the same value and the function is called at driver side. Seems like a mistake. ## How was this patch tested? Unit test was added Closesapache#25108 from HyukjinKwon/SPARK-28321. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
gatorsmile
commented
Jul 21, 2019
This a nice fix, but we still need to document it in the migration guide. This changes a behavior. Also it could cause a perf regression when calling the 0-args Java UDF is expensive. |
HyukjinKwon
commented
Jul 22, 2019
Yea, that's fine. Let me update the migration guide. |
…UDF's internal behaviour change ## What changes were proposed in this pull request? This PR proposes to add a note in the migration guide. See apache#25108 (comment) ## How was this patch tested? N/A Closesapache#25224 from HyukjinKwon/SPARK-28321-doc. Lead-authored-by: HyukjinKwon <gurwls223@apache.org> Co-authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
0-args Java UDF alone calls the function even before making it as an expression.
It causes that the function always returns the same value and the function is called at driver side.
Seems like a mistake.
How was this patch tested?
Unit test was added