-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(stream): temporal join support pk prefix join condition #10627
feat(stream): temporal join support pk prefix join condition #10627
Conversation
Codecov Report
@@ Coverage Diff @@
## main #10627 +/- ##
==========================================
- Coverage 70.23% 70.22% -0.02%
==========================================
Files 1285 1285
Lines 219704 219836 +132
==========================================
+ Hits 154311 154371 +60
- Misses 65393 65465 +72
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest LGTM
@@ -271,40 +386,42 @@ impl<S: StateStore, const T: JoinTypePrimitive> TemporalJoinExecutor<S, T> { | |||
.set(self.right_table.cache.len() as i64); | |||
match msg? { | |||
InternalMessage::Chunk(chunk) => { | |||
// Compact chunk, otherwise the following keys and chunk rows might fail to zip. | |||
let chunk = chunk.compact(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? chunk.rows()
should only returns visible rows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let keys = K::build(&self.left_join_keys, chunk.data_chunk())?;
for ((op, left_row), key) in chunk.rows().zip_eq_debug(keys.into_iter()) {
We need to align keys with rows, but keys
can't handle visible ops. Previously I also thought like you, but encounter this issue. Stream hash joins work around by compact
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can filter out the empty keys for now (but the assumption is really easy to break, we need further encapsulation for this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this pattern is quite common(HashJoin
, TopN
). We can do a refactor for this pattern later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.
Release note