alamb commented on code in PR #19893:
URL: https://github.com/apache/datafusion/pull/19893#discussion_r2761028544


##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -246,6 +247,172 @@ impl JoinLeftData {
     }
 }
 
+/// Helps to build [`HashJoinExec`].

Review Comment:
   This is very nice



##########
datafusion/physical-plan/src/aggregates/mod.rs:
##########
@@ -1370,9 +1377,9 @@ impl ExecutionPlan for AggregateExec {
     ) -> Result<Arc<dyn ExecutionPlan>> {
         let mut me = AggregateExec::try_new_with_schema(

Review Comment:
   As a follow on PR, I think we can probably avoid a lot of redundant work 
here -- `try_new_with_schema` does many things, including re-compute plan 
properties



##########
datafusion/physical-optimizer/src/join_selection.rs:
##########
@@ -191,30 +191,18 @@ pub(crate) fn try_collect_left(
             {
                 Ok(Some(hash_join.swap_inputs(PartitionMode::CollectLeft)?))
             } else {
-                Ok(Some(Arc::new(HashJoinExec::try_new(
-                    Arc::clone(left),
-                    Arc::clone(right),
-                    hash_join.on().to_vec(),
-                    hash_join.filter().cloned(),
-                    hash_join.join_type(),
-                    hash_join.projection.clone(),
-                    PartitionMode::CollectLeft,
-                    hash_join.null_equality(),
-                    hash_join.null_aware,
-                )?)))
+                Ok(Some(Arc::new(
+                    HashJoinExecBuilder::from(hash_join)

Review Comment:
   ❤️ 



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