Dandandan commented on code in PR #19808:
URL: https://github.com/apache/datafusion/pull/19808#discussion_r2690186033


##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -958,6 +966,15 @@ impl ExecutionPlan for HashJoinExec {
                     Distribution::HashPartitioned(right_expr),
                 ]
             }
+            PartitionMode::LazyPartitioned => {
+                // LazyPartitioned mode: build side is NOT repartitioned (we 
read all
+                // partitions and filter locally), but probe side IS 
hash-partitioned.
+                let right_expr = self.on.iter().map(|(_, r)| 
Arc::clone(r)).collect();

Review Comment:
   *  we can probably implement it for both sides (`vec![
                       Distribution::UnspecifiedDistribution,
                       Distribution::UnspecifiedDistribution,
                   ]` to also save the `RepartitionExec` on the right side
   * We should compute the hashes and indices for each partition only once 
instead of for each partition (to avoid making many partitions slow).



-- 
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]

Reply via email to