viirya commented on code in PR #10702: URL: https://github.com/apache/datafusion/pull/10702#discussion_r1619353656
########## 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: Hmm, some functions used in `swap_hash_join` are also used by other functions like `swap_nl_join`. So I cannot simply move these functions into `HashJoinExec` as private ones. Only I can do is move these functions to joins/utils.rs in `physical-plan` crate and make them as public APIs so both join_selection.rs and `HashJoinExec` can use them. It makes more APIs public actually, including `swap_join_filter`, `swap_reverting_projection` and `swap_join_type`. I think it is not so worth making more public APIs just for `swap_hash_join`. Seems the current approach is better? WDYT? -- 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]
