Skip to content

feat(iceberg): plan WriteDelta in the split write path and keep it on the JVM DeltaWriter - #6693

Merged
andygrove merged 1 commit into
apache:mainfrom
unikdahal:feat/write-delta-jvm-dispatch
Oct 7, 2026
Merged

andygrove merged 1 commit into
apache:mainfrom
unikdahal:feat/write-delta-jvm-dispatch

Conversation

@unikdahal

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #6692.

Part of #6240.

Rationale for this change

On Spark 3.5+, Iceberg merge-on-read DELETE, UPDATE and MERGE write through WriteDelta, which the split Iceberg write path does not model. The native position-delta writer planned in #6240 needs a recognised, tested dispatch point first. This keeps behaviour unchanged for users and makes the later native work a writer swap rather than a planner change.

What changes are included in this PR?

  • Recognise Iceberg WriteDelta on Spark 3.5+; Spark 3.4 keeps the stock plan.
  • Carry only the operation and Spark projection state the JVM delta path needs, using Spark's RowDeltaUtils operation constants instead of copies of the numeric ids.
  • Run position-delta rows through Iceberg's JVM DeltaWriter. The native Iceberg writer stays out of the delta path (CometIcebergWriteExec is never used for them).
  • Keep row-level write summaries, writer reporting, AQE behaviour and failure cleanup the same as the stock Iceberg path.
  • Fall back with a reason when the version-specific logical-plan extraction cannot be done.
  • Update the Iceberg writes user and contributor guides.

Out of scope, for later items in #6240: a native delta operator or protobuf, a native position-delete writer or file layout contract, loading previous deletes, and a native feature flag. There are no Rust changes or dependencies.

How are these changes tested?

  • DELETE, UPDATE and MERGE results match the stock Iceberg JVM path.
  • Position-delta dispatch plans without CometIcebergWriteExec.
  • Copy-on-write and merge-on-read MERGE plans match the stock path with AQE on and off.
  • Row-level snapshot summaries match where Spark exposes them.
  • Writer reporting classifies the intercepted JVM WriteDelta.
  • Task commit location extraction covers position-delta data and delete files.
  • A reflection test covers the version-specific logical-plan extraction.

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

Labels

area:Iceberg area:writer Native Parquet writer enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan Iceberg WriteDelta in the split write path and keep it on the JVM DeltaWriter

3 participants