alamb commented on code in PR #13910: URL: https://github.com/apache/datafusion/pull/13910#discussion_r1899158392
########## datafusion/physical-plan/src/joins/hash_join.rs: ########## @@ -566,8 +566,87 @@ impl HashJoinExec { boundedness_from_children([left, right]), )) } + + /// Returns a new `ExecutionPlan` that computes the same join as this one, + /// with the left and right inputs swapped using the specified + /// `partition_mode`. + /// + /// # Notes: + /// + /// This function is public so other downstream projects can use it to + /// construct `HashJoinExec` with right side as the build side. + pub fn swap_inputs( + &self, + partition_mode: PartitionMode, Review Comment: I am not 100% sure Some uses clearly are unnecessary where the type of the join is simply passed in: https://github.com/apache/datafusion/blob/fce3fb3033ae50e8590e075ffb11422112128233/datafusion/core/src/physical_optimizer/join_selection.rs#L569 Other places like this are less clear that the output type is the same as the input type: https://github.com/apache/datafusion/blob/fce3fb3033ae50e8590e075ffb11422112128233/datafusion/core/src/physical_optimizer/join_selection.rs#L285 I'll try and make a PR and see what happens if we don't send it -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org