Github user skambha commented on a diff in the pull request:
https://github.com/apache/spark/pull/17185#discussion_r206985225
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
---
@@ -120,22 +120,54 @@ abstract class LogicalPlan
/**
* Resolve the given `name` string against the given attribute,
returning either 0 or 1 match.
--- End diff --
The resolution logic needs to account to compare the full qualifier. If
you are trying to resolve db1.t1.i1, the match needs to happen against the
entire qualifier of the attribute. â¨
For e.g:
```SQL
select db1.t1.i1 from t1 // current database is db1 and lets say t1 has
columns i1, i2.
```
When resolving db1.t1.i1, against the following set of Input attributes.
we will have the following attribute references:
- AttributeReference ( qualifier Seq(db1, t1) and name is i1)
- AttributeReference ( qualifier Seq(db1, t1) and name is i2)
So the new resolution logic will match the entire qualifier sequence and
then match the column ( ie the attribute name)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]