-
Notifications
You must be signed in to change notification settings - Fork 167
fix: propagate null bitmap in evaluate_map_to_struct #2419
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
Merged
DrakeLin
merged 5 commits into
delta-io:main
from
momcilomrk-db:fix/map-to-struct-null-propagation
Apr 21, 2026
+107
−8
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8500200
fix: propagate null bitmap in evaluate_map_to_struct
momcilomrk-db 87b0975
test: add tests for MAP_TO_STRUCT null bitmap propagation
momcilomrk-db 3a303d0
make test more consistent
momcilomrk-db 9e14638
add comment
momcilomrk-db 0fde572
test: address review feedback on MAP_TO_STRUCT tests
momcilomrk-db File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
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.
Please add a comment.
Noneand it was so obviously correct that it wasn't worth having a comment about why it is None.map_array.nulls().cloned()and, since I don't see any comment, apparently it is obvious why this should bemap_array.nulls().cloned().Yet -- this was a bug. Clearly it is not obvious.
Please add a detailed comment explaining why, what happens when it is present, what happens if it was NOT present, etc.
We need to remind ourselves in the future (and perhaps in other similar areas of the code) why this value MUST be set.
@dengsh12 and @DrakeLin -- Remember to raise the bar on PR reviews and aim for excellent code clariity
Uh oh!
There was an error while loading. Please reload this page.
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.
Good point!
But in this special case ... I feel like reservingLet's add a comment stating the corner case, and in the future claude would know this corner case existsmap_array.nulls().cloned()is the straightforward way(extract things from theMapArrayand retain the nulls), perhaps we should add comments if we set it toNone(uncommon since dropping the nullabilities)?Uh oh!
There was an error while loading. Please reload this page.
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 agree I think it makes sense to add detailed comments now more than before since Claude can pick it up and not create the same bug in the future.
For example I asked the claude to look at the previous PRs (to find when the bug was introduced), and it also found this related issue #1645 which seems to be the same None pattern. If there was a comment maybe it would pick it up in this case as well.