Skip to content

Use DataFusion Parquet virtual row_number for DuckLake row positions #130

Description

@anoop-narang

DataFusion PR apache/datafusion#22026 has merged reader-level Parquet virtual-column plumbing, including support for the Arrow/parquet RowNumber virtual column via TableSchema / ParquetOpener. This is the upstream mechanism DuckLake should eventually use for physical row positions.

Update (target release): apache/datafusion#22026 did not ship in DataFusion 54.0.0 — it landed after the 54 release branch was cut. It is now slated for DataFusion 55.0.0 (~Jun/Jul 2026), where it is tracked in the 55.0.0 release issue apache/datafusion#22393. This work is blocked until 55.0.0 is published to crates.io. (Latest published datafusion is 54.0.0, released 2026-06-08, which does not include it.)

Current state:

Desired future state:

  • After upgrading to a DataFusion release that includes feat: Plumb Parquet virtual columns (row_number) through TableSchema and ParquetOpener apache/datafusion#22026 (i.e. 55.0.0), request a Parquet virtual row-number column from the scan and use it as DuckLake's internal physical row position.
  • Feed that column into positional delete filtering and synthetic rowid = row_id_start + physical_row_position.
  • Drop the internal position column before user-visible output, preserving zero-column row counts.
  • Keep the current fast path for scans that do not need rowid or positional deletes.

Why this matters:

  • DuckLake positional deletes and row lineage require true physical row positions in the Parquet file.
  • Reader-level row numbers should allow DataFusion/Parquet to preserve more pruning while still producing correct physical positions.

References:

Acceptance criteria:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions