Commit ece2b0f
Feature: Incremental Append Scan
Adds IncrementalAppendScan, which accumulates the data appended between
two snapshots. Builds on the BaseScan / ManifestGroupPlanner refactor in
sm/table-scan-refactor; split out of #3364 per reviewer request, reviving
the work from #2235.
- Table.incremental_append_scan(...) builds an IncrementalAppendScan over
the (from_snapshot_id_exclusive, to_snapshot_id_inclusive] range;
StagedTable overrides it to raise, mirroring scan().
- Walks the append-only ancestors in the range, dedups the data manifests
whose added_snapshot_id is in range (Set semantics via ManifestFile
__eq__/__hash__), and filters manifest entries to ADDED-in-range via a
new manifest_entry_filter on ManifestGroupPlanner.plan_files.
- Projects onto the table's current schema (not the snapshot schema).
- from_snapshot_id_exclusive is validated with is_parent_ancestor_of, so
an expired start cursor is accepted as long as the lineage still passes
through it; equal from/to is rejected. Adds the snapshot helpers
ancestors_between_ids and is_parent_ancestor_of.
- Unit tests (validation, current-schema projection, type preservation,
expired-from) and integration tests (append-only, non-append ignored,
schema evolution within range, partition/metrics pruning, disconnected
snapshots), plus the test_incremental_read provision fixture.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0064fc9 commit ece2b0f
6 files changed
Lines changed: 665 additions & 21 deletions
File tree
- dev
- pyiceberg/table
- tests
- integration
- table
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
0 commit comments