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

    https://github.com/apache/spark/pull/22318#discussion_r214573271
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameJoinSuite.scala ---
    @@ -295,4 +295,17 @@ 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") {
    +    withSQLConf(SQLConf.CROSS_JOINS_ENABLED.key -> "false") {
    +      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")
    +
    +      checkAnswer(r, Row(2, 2, 2) :: Row(4, 4, 4) :: Nil)
    +    }
    +  }
    +
    --- End diff --
    
    nit: remove this empty line


---

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

Reply via email to