viirya commented on code in PR #10702:
URL: https://github.com/apache/datafusion/pull/10702#discussion_r1617872081


##########
datafusion/core/src/physical_optimizer/join_selection.rs:
##########
@@ -157,7 +157,9 @@ fn swap_join_projection(
 }
 
 /// This function swaps the inputs of the given join operator.
-fn swap_hash_join(
+/// This function is public so other downstream projects can use it
+/// to construct `HashJoinExec` with right side as the build side.
+pub fn swap_hash_join(

Review Comment:
   Spark supports build right in HashJoin operator internally. In planning 
stage, it decides which side is build side.
   
   However, DataFusion HashJoin planning takes alternative approach. DataFusion 
HashJoin operator only supports build left. In optimization stage, once 
DataFusion finds build right is better, it will call this function to swap 
inputs for HashJoin to achieve build right effect.
   
   So, to make Comet to use DataFusion HashJoin to support Spark build right 
HashJoin, we only need this function to be public so Comet can directly use 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: [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