Skip to content

Add PageIndexBuilder and PageIndexProvider for Parquet page indexes - #10842

Merged
etseidl merged 86 commits into
apache:mainfrom
etseidl:page_index_provider
Sep 8, 2026
Merged

etseidl merged 86 commits into
apache:mainfrom
etseidl:page_index_provider

Conversation

@etseidl

@etseidl etseidl commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

This grew out of a discussion in #10784 and relates to apache/datafusion#24288 (comment). This PR provides a new builder for creating page index structures, and also adds a new PageIndexProvider trait to allow more performant implementations.

What changes are included in this PR?

Adds PageIndexBuilder, PageIndexProvider, implements PageIndexProvider for PageIndex, and adds RowGroupPageIndex as a helper to support fetching page indexes for a specific row group (replaces the X_index_for_rowgroup() functions on PageIndex).

Are these changes tested?

Yes, should be covered by existing tests

Are there any user-facing changes?

Yes, this changes the public API for accessing page index information

Created with the aid of Claude Code, but I own the changes.

@etseidl

etseidl commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @alamb! I think I've addressed all of your comments, PTAL when you can. I still need to add issues for the serialization gap and memory accounting. I think the former is a pretty easy fix, but the latter will take some thought (we've gone down this rabbit hole before (e.g. #9138)

Edit: I have the serialization ready to go once this merges. Non-breaking so it can wait for 60.1.0.

Comment thread parquet/src/file/metadata/mod.rs
@bharath-techie

Copy link
Copy Markdown

Thanks for the changes @etseidl

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @etseidl -- I went through this one again

I filed some follow on tickets

And then I pushed some commits to:

  1. Update the TODO comments with links to issues
  2. Fix some other random small cleanups found while reviewing

I think we are ready now. Maybe you can take one last quick peek and then merge it in!

Comment thread parquet/src/file/metadata/mod.rs Outdated
#[cfg(not(feature = "encryption"))]
let encryption_size = 0usize;

// We can only determine the heap size for PageIndex. Custom providers are

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etseidl

etseidl commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @alamb, your changes look good. I'll merge once CI finishes.

@etseidl
etseidl merged commit 7438071 into apache:main Sep 8, 2026
32 checks passed
@etseidl
etseidl deleted the page_index_provider branch September 8, 2026 22:44
@adriangb

adriangb commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Amazing to see this land! @etseidl do you plan to use this to work on alternative storage / representation for page indexes (particularly for wide tables with sparse reads)?

@alamb

alamb commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

We did it!

@etseidl

etseidl commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Amazing to see this land! @etseidl do you plan to use this to work on alternative storage / representation for page indexes (particularly for wide tables with sparse reads)?

Thanks @adriangb. TBH I haven't really thought that far ahead. I was hoping to get more requirements from the Datafusion side before doing too much further engineering. I'm certainly interested in having other providers in the parquet crate.

Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Sep 18, 2026
…es (apache#10842)

# Which issue does this PR close?

- Part of apache#7582
- Closes apache#10824.

# Rationale for this change

This grew out of a discussion in apache#10784 and relates to
apache/datafusion#24288 (comment).
This PR provides a new builder for creating page index structures, and
also adds a new `PageIndexProvider` trait to allow more performant
implementations.

# What changes are included in this PR?
Adds `PageIndexBuilder`, `PageIndexProvider`, implements
`PageIndexProvider` for `PageIndex`, and adds `RowGroupPageIndex` as a
helper to support fetching page indexes for a specific row group
(replaces the `X_index_for_rowgroup()` functions on `PageIndex`).

# Are these changes tested?

Yes, should be covered by existing tests

# Are there any user-facing changes?
Yes, this changes the public API for accessing page index information


Created with the aid of Claude Code, but I own the changes.

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Sep 21, 2026
…es (apache#10842)

# Which issue does this PR close?

- Part of apache#7582
- Closes apache#10824.

# Rationale for this change

This grew out of a discussion in apache#10784 and relates to
apache/datafusion#24288 (comment).
This PR provides a new builder for creating page index structures, and
also adds a new `PageIndexProvider` trait to allow more performant
implementations.

# What changes are included in this PR?
Adds `PageIndexBuilder`, `PageIndexProvider`, implements
`PageIndexProvider` for `PageIndex`, and adds `RowGroupPageIndex` as a
helper to support fetching page indexes for a specific row group
(replaces the `X_index_for_rowgroup()` functions on `PageIndex`).

# Are these changes tested?

Yes, should be covered by existing tests

# Are there any user-facing changes?
Yes, this changes the public API for accessing page index information


Created with the aid of Claude Code, but I own the changes.

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change Changes to the arrow API next-major-release the PR has API changes and it waiting on the next major version 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

4 participants