You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/02 21:12:14 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5343: Support catalog.schema.table.column in SQL SELECT and WHERE

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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org