Registry Mirror
Skip to content

Conversation

@manuzhang

@manuzhang manuzhang commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #3432.

Rationale for this change

Reading _metadata.row_index falls back to Spark even though Comet's DataFusion version can generate original, zero-based Parquet row positions.

What changes are included in this PR?

  • Plan Spark's generated row index as a Parquet virtual column and preserve Spark's projection order relative to partition and constant metadata columns, including empty scan tasks.
  • Keep predicates that reference the row index out of Parquet pushdown. Other predicates can still prune or filter rows without renumbering their positions.
  • Keep the existing fallback for split-dependent metadata.

How are these changes tested?

  • Rust: 34 Parquet scan tests and 5 empty-scan planner tests passed.
  • Spark 4.1.3 with Arrow Java 20.0.0: 98 tests passed across ParquetReadV1Suite and CometScanRuleSuite (one existing test ignored). The new regression checks multiple files and row groups, row-level pushdown on and off, index-only projection, and a predicate on an index absent from the result.

Prepared with Codex.

Co-authored-by: Codex <codex@openai.com>
@github-actions github-actions Bot added enhancement New feature or request area:scan Parquet scan / data reading area:joins Join operators and dynamic filter pushdown area:Delta Delta Lake contrib (native scan, deletion vectors) labels Dec 2, 2026
Co-authored-by: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Delta Delta Lake contrib (native scan, deletion vectors) area:joins Join operators and dynamic filter pushdown area:scan Parquet scan / data reading enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parquet reader: Add support for reading row index metadata columns

1 participant