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

    https://github.com/apache/spark/pull/12736#discussion_r61344182
  
    --- Diff: 
sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java ---
    @@ -291,7 +291,7 @@ public void testSetOperation() {
           unioned.collectAsList());
     
         Dataset<String> subtracted = ds.except(ds2);
    -    Assert.assertEquals(Arrays.asList("abc", "abc"), 
subtracted.collectAsList());
    +    Assert.assertEquals(Arrays.asList("abc"), subtracted.collectAsList());
    --- End diff --
    
    ```scala
      test("except") {
        val df_left = Seq(1, 2, 2, 3, 3, 4).toDF("id")
        val df_right = Seq(1, 3).toDF("id")
    
        checkAnswer(
          df_left.except(df_right),
          Row(2) :: Row(2) :: Row(4) :: Nil
        )
      }
    ```
    
    This is the example.
    For `EXCEPT ALL`, we should output
    ```scala
    Row(2) :: Row(2) :: Row(3) :: Row(4) :: Nil
    ```
    For `EXCEPT DISTINCT`, we should output
    ```scala
    Row(2) :: Row(4) :: Nil
    ```
    
    Thus, the current master is wrong. 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to