ygf11 commented on code in PR #5509:
URL: https://github.com/apache/arrow-datafusion/pull/5509#discussion_r1133074480


##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -947,16 +939,16 @@ impl LogicalPlanBuilder {
                 let right_key = r.into();
 
                 let left_using_columns = left_key.to_columns()?;
-                let normalized_left_key = normalize_col_with_schemas(
+                let normalized_left_key = 
normalize_col_with_schemas_and_ambiguity_check(
                     left_key,
-                    &[self.plan.schema(), right.schema()],
+                    &[&[self.plan.schema(), right.schema()]],
                     &[left_using_columns],
                 )?;
 
                 let right_using_columns = right_key.to_columns()?;
-                let normalized_right_key = normalize_col_with_schemas(
+                let normalized_right_key = 
normalize_col_with_schemas_and_ambiguity_check(
                     right_key,
-                    &[self.plan.schema(), right.schema()],
+                    &[&[self.plan.schema(), right.schema()]],

Review Comment:
   This improvement makes sense to me.
   
   We can replace `join_detailed` with `join_with_expr_keys`, and remove 
`join_detailed` after this pr.
   
https://github.com/apache/arrow-datafusion/blob/9587339b0fb060f8d153bbb0f8de6a740195ccea/datafusion/expr/src/logical_plan/builder.rs#L568
   
https://github.com/apache/arrow-datafusion/blob/9587339b0fb060f8d153bbb0f8de6a740195ccea/datafusion/expr/src/logical_plan/builder.rs#L928
      



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

Reply via email to