Spark: Add native CDC for copy-on-write tables - #17953
Draft
huan233usc wants to merge 4 commits into
Draft
Conversation
Expose Iceberg changelog scans through Spark 4.2 native CDC APIs for batch and streaming reads. Require v3 row lineage so Spark can remove copy-on-write carry-over rows and derive update pre/post images correctly.\n\nRelated to apache#17949\n\nGenerated-by: Cursor
added 3 commits
September 4, 2026 17:28
Persist the CDC initial offset using the same source checkpoint mechanism as regular Iceberg streams and cap AvailableNow at a snapshot boundary. Generated-by: Cursor
Apply Spotless formatting after validating through the Databricks Maven proxy. Generated-by: Cursor
Extract common offset, partition, checkpoint, and AvailableNow handling while keeping changelog planning atomic at snapshot boundaries. Generated-by: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose Iceberg change data through the Spark 4.2 Data Source V2
ChangelogAPI.I tried to piggyback existing change log table implementation.
Currently the table only implements COW, so this PR only support COW case.
MOR will be a seperate efforts
Related to #17949.
I will make more test before making this a former PR
AI Disclosure