Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/20333#discussion_r162758553 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameJoinSuite.scala --- @@ -274,4 +274,18 @@ class DataFrameJoinSuite extends QueryTest with SharedSQLContext { checkAnswer(innerJoin, Row(1) :: Nil) } + test("SPARK-23087: don't throw Analysis Exception in CheckCartesianProduct when join condition " + + "is false or null") { + val df = spark.range(10) + val dfNull = spark.range(10).select(lit(null).as("b")) + val planNull = df.join(dfNull, $"id" === $"b", "left").queryExecution.analyzed + + spark.sessionState.executePlan(planNull).optimizedPlan + + val dfOne = df.select(lit(1).as("a")) + val dfTwo = spark.range(10).select(lit(2).as("a")) --- End diff -- `a` -> `b`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org