Repository navigation
[Spark] Reuse DeltaSourceSnapshot for V2 streaming initial snapshots - #7798
Merged
timothyw553 merged 4 commits intoOct 5, 2026
Merged
timothyw553 merged 4 commits into
timothyw553 merged 4 commits into
Conversation
PorridgeSwim
requested review from
huan233usc,
murali-db,
raveeram-db,
tdas and
timothyw553
as code owners
October 2, 2026 22:07
PorridgeSwim
force-pushed
the
you-zhou_data/dsv2-delta-source-snapshot
branch
from
October 5, 2026 18:05
fec9670 to
a29a860
Compare
seewishnew
approved these changes
Oct 5, 2026
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.
Which Delta project/connector is this regarding?
Description
DeltaV2MicroBatchStreamcurrently has two initial-snapshot implementations: a driver-sideInitialSnapshotCachethat materializes the full file list, and a flag-gated DataFrame-based snapshot cache (streaming.distributedInitialSnapshot). The V1DeltaSourcealready handles initial-snapshot ordering and lifecycle throughDeltaSourceSnapshot.This PR makes
DeltaV2MicroBatchStreamuseDeltaSourceSnapshotexclusively:DeltaSourceSnapshotfor the initial snapshot version and reuse it while the stream reads that snapshot.InitialSnapshotCache, the DataFrame snapshot cache routing, and their helpers fromDeltaV2MicroBatchStream.KernelActionUtils.toKernelScanAddFile, which converts a V1AddFileto the Kernel scanAddFile. It keeps deletion vectors, row-tracking fields, tags, and stats.streaming.initialSnapshotMaxFiles) and itsDELTA_STREAMING_INITIAL_SNAPSHOT_TOO_LARGEerror.DeltaSourceSnapshotdoes not collect the whole file list on the driver, so the limit no longer applies.How was this patch tested?
KernelActionUtilsSuitetest round-trips a V1AddFilethroughtoKernelScanAddFileandaddFileFromKernel, covering partition values, tags, deletion vector, row-tracking fields, and stats.Does this PR introduce any user-facing changes?
No. The removed config and error class were internal and applied only to the V2 streaming source.