-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix HashJoin evaluating during plan #2317
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
Conversation
| num_rows, | ||
| start.elapsed().as_millis() | ||
| ); | ||
| let on_right = self.on.iter().map(|on| on.1.clone()).collect::<Vec<_>>(); |
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 recommend comparing with whitespace ignored - https://github.com/apache/arrow-datafusion/pull/2317/files?w=1
| let right_stream = self.right.execute(partition, context.clone()).await?; | ||
| let on_right = self.on.iter().map(|on| on.1.clone()).collect::<Vec<_>>(); | ||
|
|
||
| let num_rows = left_data.1.num_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.
This logic is moved into the stream implementation
| match build_side.as_ref() { | ||
| Some(stream) => stream.clone(), | ||
| None => { | ||
| let start = Instant::now(); |
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.
This logic is moved into collect_left_input
alamb
left a comment
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.
| RecordBatchStream, SendableRecordBatchStream, | ||
| }; | ||
| use crate::execution::context::TaskContext; | ||
| use crate::physical_plan::join_utils::{OnceAsync, OnceFut}; |
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.
👍
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Which issue does this PR close?
Closes #2173
Rationale for this change
Follows on from #2310 and applies the same treatment to HashJoinExec
What changes are included in this PR?
Extract the common futures shenanigans into a
OnceAsyncand then uses this within both CrossJoinExec and HashJoinExecAre there any user-facing changes?
HashJoinExec no longer evaluates during the plan