feat(batch): introduce batch AsOf join #19790
Open
+230
−65
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.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
plan the batch asof join as a hash join + a group top 1 + an optional projection. The group top 1 will be sorted by the right side asof column and group by the hash key. The optional projection is for pruning the additional asof column added for the GroupTopN.
Checklist
Documentation
Usage is the same same as #18683
Ties in the asof column in the right table.
The query result is non-deterministic when there are ties in the inequality condition column in the right table. ASOF JOIN aims to find and join the nearest record from the right table and only matches 1 row for each record from the left table. Therefore when there are ties in the right table, the right table row matched in the returned query result could be different in multiple runs.
Release note