Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14719#discussion_r78144199
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala 
---
    @@ -1580,6 +1583,28 @@ class DataFrameSuite extends QueryTest with 
SharedSQLContext {
         assert(df.persist.take(1).apply(0).toSeq(100).asInstanceOf[Long] == 
100)
       }
     
    +  test("""SPARK-17154: df("column_name") should return correct result when 
we do self-join""") {
    --- End diff --
    
    What happens when:
    
        val joined = df.join(df, "inner")  // columns: col1, col2, col3, col1, 
col2, col3
        val selected  = joined.select(df("col1"))
    
    As there are two plans with the same plan id, the breadth-first search will 
get one plan among them. So df("col") will be resolved. However, I think in 
this case, we should have an ambiguous error message.
    
    



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to