Jefffrey commented on code in PR #5343:
URL: https://github.com/apache/arrow-datafusion/pull/5343#discussion_r1119903703
##########
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:
Yeah was thinking maybe having something like `Into<TableReference>` or the
like.
Related, but I feel TableReference and its related structs
OwnedTableReference and ResolvedTableReference got a bit out of hand, since
they seem all very similar and have conversions between them, but still are
quite separate. I think I initially had `field_with_qualified_name` accept a
reference to an OwnedTableReference but changed it to TableReference as that
wouldn't require owning a bunch of strings if you just wanted to pass in a
reference, but can see it doesn't really result in a nice API imo
Maybe need refactoring around the TableReference structs to try make them
more interchangeable, via a common trait possibly
--
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]