ygf11 commented on code in PR #5156: URL: https://github.com/apache/arrow-datafusion/pull/5156#discussion_r1102378925
########## datafusion/core/src/physical_plan/joins/nested_loop_join.rs: ########## @@ -304,6 +280,14 @@ async fn load_left_specified_partition( Ok(merged_batch) } +// BuildLeft means the left relation is the single patrition side. +// For full join, both side are single partition, so it is BuildLeft and BuildRight, treat it as BuildLeft. +pub fn left_is_build_side(join_type: JoinType) -> bool { Review Comment: Current the indices type are fixed in the following functions, it is not enough, so we should make them more generic first. ```text apply_join_filter_to_indices build_batch_from_indices adjust_indices_by_join_type get_semi_indices get_anti_indices ``` Then we can choose array corresponding the distribution(left and right), like: * (Single, Unspecified) -> (UInt64Array, UInt32Array) * (Unspecified, Single) -> (UInt32Array, UInt64Array) * (UInt32Array, UInt32Array) --- `PartitionMode::Partitioned` for HashJoin * (UInt64Array, UInt64Array) --- Full join in NestedLoopJoin -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org