[python] Add opt-in Parquet OffsetIndex reads for row windows - #9850
Draft
XiaoHongbo-Hope wants to merge 3 commits into
Draft
XiaoHongbo-Hope wants to merge 3 commits into
XiaoHongbo-Hope wants to merge 3 commits into
Conversation
XiaoHongbo-Hope
force-pushed
the
codex/lerobot-window-stack
branch
from
September 18, 2026 09:23
e58ee55 to
9932c18
Compare
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.
What
Add opt-in Parquet OffsetIndex reads for one contiguous row-ID window per row group. PyPaimon fetches the selected data pages and required dictionary pages, then decodes them with PyArrow. This supports scalar and nested STRUCT/ARRAY/MAP fields, including nested projections.
Enable it per read:
The option is off by default in PyPaimon. Disjoint windows, VARIANT, missing indexes, decoded row-group cache reads, and unsupported or unprofitable selections use the existing reader. This does not change the table format or add ColumnIndex predicate filtering.
Trade-off
Reading fewer bytes can require more range requests, so lower latency is not guaranteed. A read-only OSS A/B on an isolated table confirmed identical results and this byte/request trade-off; it is not an end-to-end throughput claim.
Validation
Tests passed on PyArrow 19 and 24, including nested fields, projections, fallback and error paths. Java parquet-mr nested fixtures matched full reads; an older PyArrow fixture exercised the fallback. PyArrow 16 was not tested locally.