Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/14580
  
    @hvanhovell The output schema is different. They are not equivalent. Thus, 
the existing way to handle `using/natural joins` is wrong. We need to introduce 
new join types. 
    
    Let me show you the examples.
    
    ```Scala
        Seq((1, "val_1"), (2, "val_2")).toDF("key", 
"value").createOrReplaceTempView("A")
        Seq((2, "val_2"), (3, "val_3")).toDF("key", 
"value").createOrReplaceTempView("B")
    ```
    
    ```Scala
    sql("select * from a full join b using(key)").show(true)
    +---+-----+-----+
    |key|value|value|
    +---+-----+-----+
    |  3| null|val_3|
    |  1|val_1| null|
    |  2|val_2|val_2|
    +---+-----+-----+
    ```
    ```Scala
    sql("select * from a full join b on a.key = b.key").show(true)
    +----+-----+----+-----+
    | key|value| key|value|
    +----+-----+----+-----+
    |null| null|   3|val_3|
    |   1|val_1|null| null|
    |   2|val_2|   2|val_2|
    +----+-----+----+-----+
    ```


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