adriangb commented on code in PR #18451:
URL: https://github.com/apache/datafusion/pull/18451#discussion_r2543806819
##########
datafusion/physical-plan/src/joins/hash_join/stream.rs:
##########
@@ -405,24 +408,34 @@ impl HashJoinStream {
.get_shared(cx))?;
build_timer.done();
- // Handle dynamic filter bounds accumulation
+ // Handle dynamic filter build-side information accumulation
//
// Dynamic filter coordination between partitions:
- // Report bounds to the accumulator which will handle synchronization
and filter updates
- if let Some(ref bounds_accumulator) = self.bounds_accumulator {
- let bounds_accumulator = Arc::clone(bounds_accumulator);
+ // Report hash maps (Partitioned mode) or bounds (CollectLeft mode) to
the accumulator
+ // which will handle synchronization and filter updates
+ if let Some(ref build_accumulator) = self.build_accumulator {
+ let build_accumulator = Arc::clone(build_accumulator);
let left_side_partition_id = match self.mode {
PartitionMode::Partitioned => self.partition,
PartitionMode::CollectLeft => 0,
PartitionMode::Auto => unreachable!("PartitionMode::Auto
should not be present at execution time. This is a bug in DataFusion, please
report it!"),
};
- let left_data_bounds = left_data.bounds.clone();
- self.bounds_waiter = Some(OnceFut::new(async move {
- bounds_accumulator
- .report_partition_bounds(left_side_partition_id,
left_data_bounds)
- .await
+ let build_data = match self.mode {
+ PartitionMode::Partitioned =>
PartitionBuildDataReport::Partitioned {
+ partition_id: left_side_partition_id,
+ bounds: left_data.bounds.clone(),
Review Comment:
I'd like to refactor `InListExpr` to store only an `ArrayRef` which solves
the problem not just here but also in other places where you'd clone it. We
could also probably refactor this to use `Option` and `take` or something as a
solution for this particular case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]