-
Notifications
You must be signed in to change notification settings - Fork 281
Fix: map_from_arrays() with NULL inputs causes native crash #3356
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
base: main
Are you sure you want to change the base?
Fix: map_from_arrays() with NULL inputs causes native crash #3356
Conversation
This reverts commit 768b3e9.
| -- Comet bug: map_from_arrays(NULL, NULL) causes native crash "map key cannot be null" | ||
| -- https://github.com/apache/datafusion-comet/issues/3327 | ||
| query ignore(https://github.com/apache/datafusion-comet/issues/3327) | ||
| query spark_answer_only |
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.
This should be fully native?
| query spark_answer_only | |
| query |
| -- https://github.com/apache/datafusion-comet/issues/3327 | ||
| query ignore(https://github.com/apache/datafusion-comet/issues/3327) | ||
| query spark_answer_only | ||
| SELECT map_from_arrays(k, v) FROM test_map_from_arrays WHERE k IS NULL |
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.
Could you also add tests where v is NULL?
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.
I think it will be the same behavior: in the original data, value == null when key == null.
statement
INSERT INTO test_map_from_arrays VALUES (array('a', 'b', 'c'), array(1, 2, 3)), (array(), array()), (NULL, NULL)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3356 +/- ##
============================================
+ Coverage 56.12% 60.03% +3.91%
- Complexity 976 1477 +501
============================================
Files 119 175 +56
Lines 11743 16178 +4435
Branches 2251 2681 +430
============================================
+ Hits 6591 9713 +3122
- Misses 4012 5114 +1102
- Partials 1140 1351 +211 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Which issue does this PR close?
Closes #3327
Rationale for this change
What changes are included in this PR?
How are these changes tested?
Tested with existing unit tests