Skip to content

[python] Add opt-in Parquet OffsetIndex reads for row windows - #9850

Draft
XiaoHongbo-Hope wants to merge 3 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-window-stack
Draft

XiaoHongbo-Hope wants to merge 3 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-window-stack

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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:

table = table.copy({"parquet.filter.columnindex.enabled": "true"})

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.

@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Assemble LeRobot camera windows in parallel [python] Optimize LeRobot temporal window assembly Sep 15, 2026
@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Optimize LeRobot temporal window assembly [python] Assemble LeRobot camera windows in parallel Sep 15, 2026
@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Assemble LeRobot camera windows in parallel [python] Add opt-in Parquet OffsetIndex reads for row windows Sep 18, 2026
@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the codex/lerobot-window-stack branch from e58ee55 to 9932c18 Compare September 18, 2026 09:23
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.

1 participant