siddubakka commented on code in PR #26164:
URL: https://github.com/apache/datafusion/pull/26164#discussion_r4233188762


##########
datafusion/physical-optimizer/src/join_selection.rs:
##########
@@ -301,32 +301,40 @@ fn statistical_join_selection_subrule(
     context: &dyn PhysicalOptimizerContext,
 ) -> Result<Transformed<Arc<dyn ExecutionPlan>>> {
     let transformed = if let Some(hash_join) = 
plan.downcast_ref::<HashJoinExec>() {
-        match hash_join.partition_mode() {
-            PartitionMode::Auto => try_collect_left(hash_join, false, context)?
-                .map_or_else(
-                    || partitioned_hash_join(hash_join, context).map(Some),
-                    |v| Ok(Some(v)),
-                )?,
-            PartitionMode::CollectLeft => try_collect_left(hash_join, true, 
context)?
-                .map_or_else(
-                    || partitioned_hash_join(hash_join, context).map(Some),
-                    |v| Ok(Some(v)),
-                )?,
-            PartitionMode::Partitioned => {
-                let left = hash_join.left();
-                let right = hash_join.right();
-                if can_swap_hash_join(hash_join)
-                    && should_swap_join_order(&**left, &**right, context)?
-                {
-                    // Null-aware RightAnti only supports CollectLeft
-                    let partition_mode = if hash_join.null_aware {
-                        PartitionMode::CollectLeft
+        if !hash_join.dynamic_expressions_produced().is_empty() {

Review Comment:
   yeah sorry about that, it got mixed in from another branch. removed it now.



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