Skip to content

GH-3991: Apply the page row count limit to the first page of ParquetWriter's row groups - #3992

Draft
kszucs wants to merge 1 commit into
apache:masterfrom
kszucs:page-row-count-limit-first-page
Draft

kszucs wants to merge 1 commit into
apache:masterfrom
kszucs:page-row-count-limit-first-page

Conversation

@kszucs

@kszucs kszucs commented Nov 24, 2026

Copy link
Copy Markdown
Member

Rationale for this change

With a page row count limit below parquet.page.size.row.check.min (100 by default), the first page of every row group written by ParquetWriter holds 100 rows instead of the limit.

What changes are included in this PR?

ColumnWriteStoreBase's constructor taking a BloomFilterWriteStore, which every ParquetWriter uses, now starts the page size checks at min(minRowCountForPageSizeCheck, pageRowCountLimit), like the other two constructors have since PARQUET-1414.

Are these changes tested?

Yes:

  • TestParquetWriter#testPageRowCountLimitAppliesToFirstPage writes 100 rows with a limit of 10 and expects ten 10-row pages. Without the fix it gets a single 100-row page.
  • TestParquetFileReaderVectoredIO's page filter and one maximum allocation were fitted to the old 100-row first page. They are adjusted so the tests still read two disjoint page spans and still split adjacent ranges at the maximum allocation.

Are there any user-facing changes?

Writers with a page row count limit below 100 now limit the first page of each row group as configured.

Closes #3991

🤖 Generated with Claude Code

…rquetWriter's row groups

ColumnWriteStoreBase's BloomFilterWriteStore constructor, used by every
ParquetWriter, did not cap the first page size check at the page row count
limit. The vectored IO tests' filter was fitted to the old page layout.
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.

ParquetWriter ignores a page row count limit below 100 on the first page of each row group

1 participant