Skip to content

feat: add native Iceberg CDC and micro-batch execution - #5888

Draft
peterxcli wants to merge 1 commit into
apache:mainfrom
peterxcli:feat/native-iceberg-cdc-and-micro-batch-streaming
Draft

feat: add native Iceberg CDC and micro-batch execution#5888
peterxcli wants to merge 1 commit into
apache:mainfrom
peterxcli:feat/native-iceberg-cdc-and-micro-batch-streaming

Conversation

@peterxcli

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #4992.

Rationale for this change

Iceberg append micro-batches and batch changelog queries cannot currently use Comet throughout their data-processing path. This adds experimental native execution while reusing Spark/Iceberg planning and recovery.

What changes are included in this PR?

  • Read Spark 4.x Iceberg micro-batches using the source's offset-bounded tasks, preserving progress and checkpoint restart. Enable compatible native aggregate computation around Spark state-store boundaries.
  • Read .changes tasks with the existing native Iceberg reader and process carry-over removal, update images, and net changes in Rust through create_changelog_view.
  • Add opt-in configuration, documentation, and CI coverage. Retain fallback for unsupported scans, state buffers, CDC value types, and procedure closure layouts.

Spark retains offsets, persistent state, and sink commits. Streaming joins/deduplication remain in Spark. Batch CDC retains Iceberg's restriction on MOR changes involving delete manifests; this does not add a streaming CDC source.

How are these changes tested?

17 integration tests passed against Polaris and RustFS with Spark 4.1.3 / Iceberg 1.11.0. They assert native execution and Spark-equivalent results for COW V1/V2/V3 CDC, snapshot/timestamp bounds, integrity queries, and streaming checkpoint/retry behavior. The same 17 tests passed with the local catalog after rebasing onto current main. Three Rust CDC tests, Clippy, Scala formatting, and style checks also passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Iceberg area:scan Parquet scan / data reading enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support native Iceberg scans in Spark Structured Streaming

1 participant