alamb commented on code in PR #5343:
URL: https://github.com/apache/arrow-datafusion/pull/5343#discussion_r1123708924


##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -545,14 +545,22 @@ impl LogicalPlanBuilder {
 
                     match (&l.relation, &r.relation) {
                         (Some(lr), Some(rr)) => {
-                            let l_is_left =
-                                
self.plan.schema().field_with_qualified_name(lr, &l.name);
-                            let l_is_right =
-                                right.schema().field_with_qualified_name(lr, 
&l.name);
-                            let r_is_left =
-                                
self.plan.schema().field_with_qualified_name(rr, &r.name);
-                            let r_is_right =
-                                right.schema().field_with_qualified_name(rr, 
&r.name);
+                            let l_is_left = 
self.plan.schema().field_with_qualified_name(
+                                &lr.as_table_reference(),

Review Comment:
   > Maybe need refactoring around the TableReference structs to try make them 
more interchangeable, via a common trait possibly
   
   I wonder if we could maybe change TableReference to use `Cow` somehow rather 
than separate variants 🤔 
   
     



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

Reply via email to