Skip to content

fix(parquet): row-align V1 pages with offset indexes - #1075

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-v1-offset-index-row-alignment
Open

fix(parquet): row-align V1 pages with offset indexes#1075
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-v1-offset-index-row-alignment

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #887

Problem

Parquet pages referenced by an OffsetIndex must begin at row boundaries. The writer already enforced this for repeated DataPageV2 columns, but repeated DataPageV1 columns still used fixed-size batching when page indexes were enabled. A logical row could consequently span two indexed V1 pages.

Change

Reuse the existing repetition-level-aware batching for repeated V1 columns when page indexing is enabled. The same condition is applied to the generated variable-length writer paths. V1 writes without page indexes retain the existing fixed-size batching behavior.

Coverage

The regression test uses indexed V1 pages, repeated three-value rows, and a batch size that does not divide the row width. It closes the writer to verify the final buffered page as well as intermediate pages.

Validation

go test ./parquet/file -run 'TestDataPageV1OffsetIndexRowBoundaries|TestDataPageV2RowBoundaries' -count=1

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 30, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parquet: V1 pages ignore row boundaries when an OffsetIndex is present

1 participant