Repository navigation
fix(reader): keep rows with a null equality-delete column value - #2781
Merged
Merged
Conversation
Collaborator
Author
|
The tl;dr from the issue is that I found this while adding Iceberg 1.11 support to DataFusion Comet, and ran the new |
blackmwk
approved these changes
Jul 8, 2026
blackmwk
left a comment
Contributor
There was a problem hiding this comment.
Thanks @mbutrovich for this fix!
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?
null#2780.What changes are included in this PR?
Equality deletes are applied by building a predicate that keeps rows not matched by any delete row. For each equality column the keep term was
col != v, produced by negating the equality match. Applied as a row filter,null != vevaluates to null, so a data row whose equality column is null was dropped. Per the spec (Equality Delete Files), a null value matches only a null delete value, so such rows should be kept.This builds the keep predicate directly in
parse_equality_deletes_record_batch_stream:col IS NULL OR col != vfor a non-null delete value, andcol IS NOT NULLfor a null delete value. Rows with a null value in an equality column are no longer deleted.Are these changes tested?
Yes, unit tests in
caching_delete_file_loadercovering the predicate construction:test_equality_delete_predicate_preserves_null_rows: a non-null delete value on a nullable column produces(col IS NULL) OR (col != v).test_equality_delete_predicate_matches_null_delete_value: a null delete value producescol IS NOT NULL.test_equality_delete_predicate_multiple_columns: per-column keep terms are OR-ed.test_equality_delete_predicate_multiple_delete_rows: per-row keep predicates are AND-ed.test_delete_file_loader_parse_equality_deletes(existing, updated): the combined case with multiple columns, a required column, and null delete values.