Skip to content

Support delete-file-backed row changes in incremental changelog scans #1884

Description

@fallintoplace

Background

Incremental changelog scanning was added in #1883 to mirror Java's newIncrementalChangelogScan() API.

The first implementation handles file-level changes from data manifests. This issue tracks delete-file-backed row changes and keeps the related work together.

Current status: file-level changelog planning is implemented in #1883. Snapshots with delete manifests are still rejected.

Implemented

  • Table.NewIncrementalChangelogScan
  • INSERT tasks for added data files
  • DELETE tasks for removed data files
  • Snapshot boundaries, change ordinals, and commit snapshot IDs
  • Filters, residuals, row-lineage task fields, and local planning

Planned

  • Define changelog task and reader types for added rows, deleted data files, and deleted rows
  • Plan position and equality delete files across snapshot ranges
  • Preserve added versus existing delete-file semantics
  • Support deletion vectors and v3 row lineage
  • Add end-to-end tests for same-snapshot changes, prior deletes, file removal, schema evolution, filters, and boundaries
  • Add documentation and decide remote planning support

Implementation notes

  • The normal scan path removes deleted rows while reading. A changelog scan needs to emit rows removed by the current snapshot.
  • A deleted data file must be read with delete files that existed before the file was removed.
  • A row-level delete needs to distinguish delete files added by the current snapshot from delete files that were already present.
  • The task shape should follow Java's AddedRowsScanTask, DeletedDataFileScanTask, and DeletedRowsScanTask, with Go naming.
  • Position-delete, equality-delete, and deletion-vector readers already exist in the table scan and inspection paths. This work should reuse them where possible.
  • Remote planning can remain unsupported initially.

Related work

References

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