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

    https://github.com/apache/spark/pull/22318#discussion_r214752480
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameJoinSuite.scala ---
    @@ -295,4 +295,14 @@ class DataFrameJoinSuite extends QueryTest with 
SharedSQLContext {
           df.join(df, df("id") <=> df("id")).queryExecution.optimizedPlan
         }
       }
    +
    +  test("SPARK-25150: Attribute deduplication handles attributes in join 
condition properly") {
    +    val a = spark.range(1, 5)
    +    val b = spark.range(10)
    +    val c = b.filter($"id" % 2 === 0)
    +
    +    val r = a.join(b, a("id") === b("id"), "inner").join(c, a("id") === 
c("id"), "inner")
    --- End diff --
    
    Why is this a simpler `a.join(b, "id").join(c, "id")`?


---

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

Reply via email to