[WIP] Add PageIndexBuilder and PageIndexProvider for Parquet page indexes - #10842
Draft
etseidl wants to merge 52 commits into
Draft
[WIP] Add PageIndexBuilder and PageIndexProvider for Parquet page indexes#10842etseidl wants to merge 52 commits into
PageIndexBuilder and PageIndexProvider for Parquet page indexes#10842etseidl wants to merge 52 commits into
Conversation
Contributor
Author
etseidl
commented
Aug 25, 2026
| /// } | ||
| /// ``` | ||
| #[derive(Debug)] | ||
| pub struct RowGroupPageIndex { |
Contributor
Author
There was a problem hiding this comment.
this struct was my solution for how to replace the functions that returned a slice of indexes for a given row group. After using it some I'm wondering if it should also carry the number of columns.
etseidl
commented
Aug 25, 2026
| } | ||
| } | ||
|
|
||
| pub trait PageIndexProvider: HeapSize + Send + Sync + std::fmt::Debug { |
Contributor
Author
There was a problem hiding this comment.
This trait replicates most of the previous PageIndex interface. The ParquetMetaData now holds a Option<Arc<dyn PageIndexProvider>> so we should be able to plug in any type of optimizations we want. I kept the old PageIndex as a default implementation primarily used on the write side.
We could later add a sparse implementation like that suggested by @adriangb on the read side.
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.
Which issue does this PR close?
PageIndexcannot be constructed outside the crate #10824.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
PageIndexProvidertrait to allow more performant implementations.What changes are included in this PR?
Adds
PageIndexBuilder,PageIndexProvider, implementsPageIndexProviderforPageIndex, and addsRowGroupPageIndexas a helper to support fetching page indexes for a specific row group (replaces theX_index_for_rowgroup()functions onPageIndex).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