Github user cloud-fan commented on the pull request:

    https://github.com/apache/spark/pull/2542#issuecomment-56952680
  
    @tianyi Let me raise an example. For `table: { a: { c: String }, b: String 
}`, if we run `select a.b from test a join test b`, your PR will  still give 2 
options to resolve `a.b`: "table a, column b", "table b, column a.b" as `a` is 
StructType. Actually we can tell that `a` have a sub column `c`, not `b`, so 
"table b, column a.b" is invalid. But it's hard to tell whether the column can 
be resolved in `LogicalPlan#resolve` as column name can be very complicated 
like `a.b[1].c.d[0]`
    I think a perfect solution is keep all the possible resolve path, and go 
one by one. If more than one path success, then throw an "ambiguousReferences" 
exception.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to