-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-12445][SQL] Fix NullPointerException when passing null as array #10401
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 #48079 has finished for PR 10401 at commit
|
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.
Can this test be done with the encoder tests?
|
Test build #48196 has finished for PR 10401 at commit
|
|
retest this please. |
|
retest this please. |
|
Test build #48228 has finished for PR 10401 at commit
|
|
ping @marmbrus @davies @cloud-fan Can you see if this patch is ok to merge? Thanks. |
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.
A simple idea is to set propafateNull = true for NewInstance, and it's also fixed in #10443 which makes false as default value for propagateNull.
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.
ok. I think this can be closed.
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.
Will #10443 be merged soon? I think I have another pr depending this fixing.
…Instance Most of cases we should propagate null when call `NewInstance`, and so far there is only one case we should stop null propagation: create product/java bean. So I think it makes more sense to propagate null by dafault. This also fixes a bug when encode null array/map, which is firstly discovered in #10401 Author: Wenchen Fan <[email protected]> Closes #10443 from cloud-fan/encoder.
…Instance Most of cases we should propagate null when call `NewInstance`, and so far there is only one case we should stop null propagation: create product/java bean. So I think it makes more sense to propagate null by dafault. This also fixes a bug when encode null array/map, which is firstly discovered in apache#10401 Author: Wenchen Fan <[email protected]> Closes apache#10443 from cloud-fan/encoder.
JIRA: https://issues.apache.org/jira/browse/SPARK-12445
Current
toCatalystArraydoesn't check if given array is null or not. We should check it to prevent java.lang.NullPointerException.