fix: mark _row_id and _last_updated_sequence_number optional - #2959
Open
anoopj wants to merge 1 commit into
Open
fix: mark _row_id and _last_updated_sequence_number optional#2959anoopj wants to merge 1 commit into
anoopj wants to merge 1 commit into
Conversation
The two v3 row-lineage metadata columns were defined as required, but the spec requires readers to produce null for both in legitimate cases: when a data file has a null first_row_id (spec Row Lineage), and for added or modified rows before inheritance. Iceberg Java marks both NestedField.optional accordingly. Mark both fields optional to match. This is a prerequisite for materializing the columns on read, where a null result must be representable.
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?
Refs #2879
What changes are included in this PR?
The two v3 row-lineage metadata columns were defined as required, but the spec requires readers to produce null for both in legit cases. e.g. when a data file has a null first_row_id, and for added or modified rows before inheritance. Iceberg Java marks both NestedField.optional accordingly. I think this was originally added as required due to an oversight.
Mark both fields optional to match. This is a prerequisite for materializing the columns on read, where a null result must be representable.
Are these changes tested?
Added a test