Fix: map_from_arrays() with NULL inputs causes native crash#3356
Open
kazantsev-maksim wants to merge 23 commits intoapache:mainfrom
Open
Fix: map_from_arrays() with NULL inputs causes native crash#3356kazantsev-maksim wants to merge 23 commits intoapache:mainfrom
kazantsev-maksim wants to merge 23 commits intoapache:mainfrom
Conversation
This reverts commit 768b3e9.
andygrove
reviewed
Feb 3, 2026
| -- 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 |
Member
There was a problem hiding this comment.
This should be fully native?
Suggested change
| query spark_answer_only | |
| query |
andygrove
reviewed
Feb 3, 2026
| -- 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 |
Member
There was a problem hiding this comment.
Could you also add tests where v is NULL?
Contributor
Author
There was a problem hiding this comment.
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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