Spark: Support Initial Snapshot Load for Streaming Reads - #18068
Open
alexprosak wants to merge 1 commit into
Open
Spark: Support Initial Snapshot Load for Streaming Reads#18068alexprosak wants to merge 1 commit into
alexprosak wants to merge 1 commit into
Conversation
alexprosak
force-pushed
the
spark-streaming-initial-snapshot-load
branch
from
September 11, 2026 20:51
6110af5 to
d9a22eb
Compare
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.
Closes #13188
Implements an initial-snapshot bootstrap for streaming reads of Iceberg tables in Spark. A streaming query started with a fresh checkpoint now reads the current snapshot in full before continuing incrementally - matching how Delta Lake's streaming source behaves by default.
Currently a fresh Iceberg streaming query without options replays the table's history from the oldest ancestor snapshot, which is slow for long-lived tables and any expired/deleted snapshots cannot be streamed. The only existing workarounds (bootstrap via batch read + cut over by timestamp) are fragile, so users can't easily express the common pattern of loading the entire table and then keeping up with new append data.
About the Change
This PR adds a
stream-from-snapshotoption:stream-from-snapshotlatestearliest<snapshot-id>stream-from-snapshotandstream-from-timestampare mutually exclusive. Previous default behavior to read from oldest ancestor can be opted-in viastream-from-snapshot=earliestFollow-ups:
stream-from-snapshotoption