-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23835][SQL] Add not-null check to Tuples' arguments deserialization #20976
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
|
Test build #88892 has finished for PR 20976 at commit
|
|
retest this please |
|
Test build #88903 has finished for PR 20976 at commit
|
|
Test build #88940 has finished for PR 20976 at commit
|
|
retest this please |
|
UT errors were caused by another commit which has been reverted. |
|
Test build #88949 has finished for PR 20976 at commit
|
|
Test build #88975 has finished for PR 20976 at commit
|
|
kindly ping @cloud-fan @marmbrus @viirya |
|
LGTM, can you add an end-to-end test case in |
|
Test build #89444 has finished for PR 20976 at commit
|
…ation ## What changes were proposed in this pull request? There was no check on nullability for arguments of `Tuple`s. This could lead to have weird behavior when a null value had to be deserialized into a non-nullable Scala object: in those cases, the `null` got silently transformed in a valid value (like `-1` for `Int`), corresponding to the default value we are using in the SQL codebase. This situation was very likely to happen when deserializing to a Tuple of primitive Scala types (like Double, Int, ...). The PR adds the `AssertNotNull` to arguments of tuples which have been asked to be converted to non-nullable types. ## How was this patch tested? added UT Author: Marco Gaido <[email protected]> Closes #20976 from mgaido91/SPARK-23835. (cherry picked from commit 0a9172a) Signed-off-by: Wenchen Fan <[email protected]>
|
thanks, merging to master/2.3! |
|
ah, a late LGTM. |
…ation There was no check on nullability for arguments of `Tuple`s. This could lead to have weird behavior when a null value had to be deserialized into a non-nullable Scala object: in those cases, the `null` got silently transformed in a valid value (like `-1` for `Int`), corresponding to the default value we are using in the SQL codebase. This situation was very likely to happen when deserializing to a Tuple of primitive Scala types (like Double, Int, ...). The PR adds the `AssertNotNull` to arguments of tuples which have been asked to be converted to non-nullable types. added UT Author: Marco Gaido <[email protected]> Closes apache#20976 from mgaido91/SPARK-23835. Ref: LIHADOOP-48531 RB=1850759 G=superfriends-reviewers R=mshen,zolin,latang,fli,yezhou A=
What changes were proposed in this pull request?
There was no check on nullability for arguments of
Tuples. This could lead to have weird behavior when a null value had to be deserialized into a non-nullable Scala object: in those cases, thenullgot silently transformed in a valid value (like-1forInt), corresponding to the default value we are using in the SQL codebase. This situation was very likely to happen when deserializing to a Tuple of primitive Scala types (like Double, Int, ...).The PR adds the
AssertNotNullto arguments of tuples which have been asked to be converted to non-nullable types.How was this patch tested?
added UT