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

    https://github.com/apache/spark/pull/13884#discussion_r68355194
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala 
---
    @@ -1541,4 +1541,13 @@ class DataFrameSuite extends QueryTest with 
SharedSQLContext {
         val df = Seq(1, 1, 2).toDF("column.with.dot")
         checkAnswer(df.distinct(), Row(1) :: Row(2) :: Nil)
       }
    +
    +  test("SPARK-16181: outer join with isNull filter") {
    +    val left = Seq("x").toDF("col")
    +    val right = Seq("y").toDF("col").withColumn("new", lit(true))
    +    val joined = left.join(right, left("col") === right("col"), 
"left_outer")
    +
    +    checkAnswer(joined, Row("x", null, null))
    +    checkAnswer(joined.filter($"new".isNull), Row("x", null, null))
    --- End diff --
    
    ah, this is subtle. `new` is replaced back to the original `col` from 
right, which is not nullable. Then, `isNull` just returns false.


---
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