Repository navigation
GH-4011: Fail on records that start with a non-zero repetition level - #4012
Open
shivadarshan-devadiga wants to merge 1 commit into
Open
shivadarshan-devadiga wants to merge 1 commit into
shivadarshan-devadiga wants to merge 1 commit into
Conversation
Contributor
Author
shivadarshan-devadiga
force-pushed
the
GH-4011-record-start-repetition-level
branch
from
December 3, 2026 16:16
84e8305 to
682d207
Compare
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.
Rationale for this change
Fixes #4011. With invalid repetition levels, the record reader assembles wrong records and drops values without an error, for example on parquet-testing's
bad_data/ARROW-GH-45185.parquet.What changes are included in this PR?
RecordReaderImplementation.read()checks that every repeated column is at repetition level 0 when a record starts, and throws aParquetDecodingExceptionotherwise. Each record visits every column at least once, so the check costs one comparison per repeated column per record.Are these changes tested?
Yes.
TestColumnIO.testReadFailsOnRecordStartingWithNonZeroRepetitionLevelwrites a page like the one inARROW-GH-45185.parquet; it fails without the change. parquet-column (1311 tests) and parquet-avro (418) pass. Reading all parquet-testing files, onlyARROW-GH-45185.parquetchanges: it now fails.Are there any user-facing changes?
Files with such levels now fail to read instead of returning wrong rows.
Closes #4011