Skip to content

Make PageIndex::new public, add doc example of building a synthetic PageIndex - #10825

Closed
alamb wants to merge 2 commits into
apache:mainfrom
alamb:fix-pageindex-pub
Closed

Make PageIndex::new public, add doc example of building a synthetic PageIndex#10825
alamb wants to merge 2 commits into
apache:mainfrom
alamb:fix-pageindex-pub

Conversation

@alamb

@alamb alamb commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

#10719 introduced the PageIndex struct but its constructor is pub(crate), so external code can no longer assemble ColumnIndexMetaData / OffsetIndexMetaData values (whose builders are still public) into a ParquetMetaData. DataFusion relies on this to construct synthetic metadata in tests that exercise page-level statistics handling (see apache/datafusion#24366).

What changes are included in this PR?

  • Make PageIndex::new pub and document its arguments
  • Add a doc example showing how to construct a synthetic PageIndex and attach it to a ParquetMetaData via ParquetMetaDataBuilder::set_page_index, modeled on the DataFusion test code that needs this API

Are these changes tested?

Yes, by the new doc example.

Are there any user-facing changes?

PageIndex::new is now part of the public API. No breaking changes.

@github-actions github-actions Bot added the parquet Changes to the parquet crate label Aug 24, 2026
@etseidl

etseidl commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Perhaps I could interest you in a builder 😅 #10784

@alamb

alamb commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Perhaps I could interest you in a builder 😅 #10784

Yes! I was just reviewing this PR and the signature for new was ugly and I had just decided I was going to have claude whip up a builder. Even better that you have one (you are already ahead!). Let's go with that

@alamb alamb closed this Aug 24, 2026
@etseidl

etseidl commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

I want am going to steal your example and merge it into the builder PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parquet: PageIndex cannot be constructed outside the crate

2 participants