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

    https://github.com/apache/spark/pull/9120#discussion_r42434348
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/joins/InnerJoinSuite.scala
 ---
    @@ -212,4 +212,20 @@ class InnerJoinSuite extends SparkPlanTest with 
SharedSQLContext {
         )
       }
     
    +  {
    +    lazy val left = myTestData.where("a = 1")
    +    lazy val right = myTestData.where("a = 1")
    +    testInnerJoin(
    +      "inner join, null safe",
    +      left,
    +      right,
    +      () => (left.col("a") <=> right.col("a")).expr,
    +      Seq(
    +        (1, 1, 1, 1),
    +        (1, 1, 1, 2),
    +        (1, 2, 1, 1),
    +        (1, 2, 1, 2)
    +      )
    --- End diff --
    
    Is there anyway we could include data such that it'll break if the original 
predicate is missing?  Maybe something like
    
    ```scala
    val df = Seq((1, Some(0)), (2, None)).toDF("a", "b")
    checkAnswer(
      df.as("x").join(df.as("y"), $"x.b" === $"y.b"),
      Row(1, 0, 1, 0) :: Row(2, null, 2, null) :: Nil)
    ```


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