Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Jul 11, 2019

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

@HyukjinKwon
Copy link
Member Author

cc @cloud-fan

@cloud-fan
Copy link
Contributor

good catch! LGTM

@SparkQA
Copy link

SparkQA commented Jul 11, 2019

Test build #107507 has finished for PR 25108 at commit c725002.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member Author

retest this please

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

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

Good catch!

Copy link
Member Author

Choose a reason for hiding this comment

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

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
Copy link

SparkQA commented Jul 11, 2019

Test build #107517 has finished for PR 25108 at commit c725002.

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

@SparkQA
Copy link

SparkQA commented Jul 11, 2019

Test build #107529 has finished for PR 25108 at commit 9039f3d.

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

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Seems OK, though I don't know enough to really review.

@SparkQA
Copy link

SparkQA commented Jul 11, 2019

Test build #107536 has finished for PR 25108 at commit 1567b6c.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in a5c88ec Jul 12, 2019
vinodkc pushed a commit to vinodkc/spark that referenced this pull request Jul 18, 2019
## 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

Closes apache#25108 from HyukjinKwon/SPARK-28321.

Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
@gatorsmile
Copy link
Member

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
Copy link
Member Author

Yea, that's fine. Let me update the migration guide.

yiheng pushed a commit to yiheng/spark that referenced this pull request Jul 24, 2019
…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

Closes apache#25224 from HyukjinKwon/SPARK-28321-doc.

Lead-authored-by: HyukjinKwon <[email protected]>
Co-authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
@HyukjinKwon HyukjinKwon deleted the SPARK-28321 branch March 3, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants