[SPARK-59183][SDP] SCD2 Ignore-null support; Populate version map per event row at ingest - #58645
Open
AnishMahto wants to merge 15 commits into
Open
[SPARK-59183][SDP] SCD2 Ignore-null support; Populate version map per event row at ingest#58645AnishMahto wants to merge 15 commits into
AnishMahto wants to merge 15 commits into
Conversation
AnishMahto
force-pushed
the
SPARK-59183-populate-verison-map-at-ingest
branch
from
September 10, 2026 17:46
541bfcc to
e5ca7f2
Compare
AnishMahto
force-pushed
the
SPARK-59183-populate-verison-map-at-ingest
branch
from
September 10, 2026 22:28
e5ca7f2 to
eb76dc4
Compare
AnishMahto
marked this pull request as ready for review
September 10, 2026 22:28
Contributor
Author
|
@jose-torres for review, see incremental diff. Diff is not as scary as line count suggests, 700+ is just unit tests. This PR simply adds logic to construct the version map per incoming row in the microbatch. Reconciliation of existing rows in the target/aux is not touched yet by this PR, that comes next. |
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.
This is a stacked PR. See incremental diff here: AnishMahto/spark@SPARK-59358-project-missing-columns-during-preprocessing...SPARK-59183-populate-verison-map-at-ingest
See previous PR in stack here: #58709
What changes were proposed in this pull request?
When processing an incoming microbatch, if ignore-null is enabled for the AutoCDC flow, a non-null version map needs to be populated for every row in the microbatch.
As per the version map contract (see
Scd2VersionMap's scaladoc), the version map is populated with null-authorship information for every event, respecting the currently active ignore-null selection.This ticket is not concerned with reconciling the microbatch's version maps with existing rows in the aux/target table.
Why are the changes needed?
Core part of the algorithm for supporting ignore-null API in SCD2.
Does this PR introduce any user-facing change?
No. The user facing interfaces for ignore-null are not exposed yet, this logic cannot be hit yet.
How was this patch tested?
Unit tests.
Was this patch authored or co-authored using generative AI tooling?
Co-authored with GPT-5.6 Sol.