[SPARK-56402][SS] Apply rangeScan API in stream-stream join format version 4#55267
Open
HeartSaVioR wants to merge 8 commits intoapache:masterfrom
Open
[SPARK-56402][SS] Apply rangeScan API in stream-stream join format version 4#55267HeartSaVioR wants to merge 8 commits intoapache:masterfrom
HeartSaVioR wants to merge 8 commits intoapache:masterfrom
Conversation
Use bounded scan ranges in stream-stream join V4 operators to narrow the iteration scope during eviction and value lookup: - scanEvictedKeys (TsWithKeyTypeStore): use scanWithMultiValues with startKey derived from the previous batch's state watermark and endKey from the current eviction threshold. Thread prevBatchStateWatermark through JoinStateWatermarkPredicate -> SupportsEvictByTimestamp. - getValuesInRange (KeyWithTsToValuesStore): use scanWithMultiValues for bounded timestamp ranges, falling back to prefixScan for full range. Create default-valued boundary rows to avoid NullPointerException when the join key schema contains non-nullable fields (e.g. window structs).
Contributor
Author
|
Only the last commit is related to this PR. Once #55226 is merged, I'll rebase. |
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.
What changes were proposed in this pull request?
This PR proposes to apply rangeScan API in stream-stream join format version 4, which will give an improvement of scanning on matching rows for time interval join and eviction.
The main idea for eviction is to perform scanning secondary index from [the end timestamp of previous scan + 1, new end timestamp], which was [None, new end timestamp]. Previously it had to go through tombstones prior batches made in prior evictions (till compaction happens), and with this change we will be able to skip those tombstones.
The idea of time interval join is straightforward - we know the timestamp range of matching rows and we used it to scope it. Previously we scan all timestamps within the key from RocksDB and apply filter. We move the due of filter to RocksDB, to leverage the same effect with the above (skipping tombstones).
Why are the changes needed?
This change will give a hit to RocksDB about the exact range to scan, reducing the chance of reading tombstone a lot.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New UTs, and existing UTs.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude 4.6 Opus