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

    https://github.com/apache/spark/pull/12736#discussion_r61311068
  
    --- 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 --
    
    Except apparently does not remove duplicates:
    ```scala
    range(0, 10).registerTempTable("a")
    range(5, 15).registerTempTable("b")
    sql("(select * from a union all select * from a) except select * from b")
    ```
    results in:
    ```
    +---+
    | id|
    +---+
    |  2|
    |  2|
    |  0|
    |  0|
    |  3|
    |  3|
    |  4|
    |  4|
    |  1|
    |  1|
    +---+
    ```
    So that is weird.


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