[format] Fix RLE skipping at sparse row-range boundaries - #9127
Merged
leaves12138 merged 2 commits intoAug 10, 2026
Conversation
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.
What is the purpose of the change?
An RLE run covers the half-open interval
[rowId, rowId + n). When its end is exactly equal torangeStart, it has no overlap with the requested sparse row range and must be skipped. The existing strict<boundary can retain that run and misalign sparse Parquet reads.For example, consider an RLE run starting at row
0withn = 10and a sparse read requesting row range[10, 10]:These ranges do not overlap. However, the old condition
rowId + n < rangeStartevaluates10 < 10to false and enters the overlap branch. It then computesstart = 10,end = 9, and an invalid zero-length intersection. Using<=skips the preceding run and lets decoding continue at row 10.Brief change log
<to<=.The regression writes 10,000 Parquet rows with an
INTcolumn and anARRAY<INT>column, then performs a sparse indexed read at row positions10and4210. It verifies the exact output:This exercises both the flat definition-level path and the repeated/list path across Parquet page and RLE boundaries.
Verifying this change
mvn -pl paimon-core -am -DskipITs -Dfast \ -Dtest=DataEvolutionSplitReadTest \ -Dsurefire.failIfNoSpecifiedTests=false testResult: 14 tests passed. Spotless and Checkstyle also passed.