-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23599][SQL][Backport-2.3] Use RandomUUIDGenerator in Uuid expression #20903
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
Conversation
|
|
||
| val seed2 = Some(r.nextLong()) | ||
| val uuid2 = evaluate(Uuid(seed2)).asInstanceOf[UTF8String] | ||
| assertIncorrectEval(() => checkEvaluationWithoutCodegen(Uuid(seed1), uuid2)) |
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.
The methods like evaluateWithGeneratedMutableProjection seems not available in 2.3 branch. Currently I choose not to add too much change to ExpressionEvalHelper for this backport. So here I just call checkEvaluationXXX methods and expect exception with expected error message.
hvanhovell
left a comment
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.
LGTM
|
Test build #88582 has finished for PR 20903 at commit
|
|
retest this please. |
|
Test build #88587 has finished for PR 20903 at commit
|
|
Merging to 2.3. Thanks! Can you close? |
…ession ## What changes were proposed in this pull request? As stated in Jira, there are problems with current `Uuid` expression which uses `java.util.UUID.randomUUID` for UUID generation. This patch uses the newly added `RandomUUIDGenerator` for UUID generation. So we can make `Uuid` deterministic between retries. This backports SPARK-23599 to Spark 2.3. ## How was this patch tested? Added tests. Author: Liang-Chi Hsieh <[email protected]> Closes #20903 from viirya/SPARK-23599-2.3.
|
Thanks! @hvanhovell |
…ession As stated in Jira, there are problems with current `Uuid` expression which uses `java.util.UUID.randomUUID` for UUID generation. This patch uses the newly added `RandomUUIDGenerator` for UUID generation. So we can make `Uuid` deterministic between retries. This backports SPARK-23599 to Spark 2.3. Added tests. Author: Liang-Chi Hsieh <[email protected]> Closes apache#20903 from viirya/SPARK-23599-2.3. Change-Id: I9b9e1b78e7ab527aa4d8fd8cdd1d0cf0942e5645
What changes were proposed in this pull request?
As stated in Jira, there are problems with current
Uuidexpression which usesjava.util.UUID.randomUUIDfor UUID generation.This patch uses the newly added
RandomUUIDGeneratorfor UUID generation. So we can makeUuiddeterministic between retries.This backports SPARK-23599 to Spark 2.3.
How was this patch tested?
Added tests.