You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:35:40 UTC

[jira] [Resolved] (SPARK-11576) [SQL] Incorrect results when using the nested self-join

     [ https://issues.apache.org/jira/browse/SPARK-11576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-11576.
----------------------------------
    Resolution: Incomplete

> [SQL] Incorrect results when using the nested self-join
> -------------------------------------------------------
>
>                 Key: SPARK-11576
>                 URL: https://issues.apache.org/jira/browse/SPARK-11576
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.0
>            Reporter: Xiao Li
>            Priority: Critical
>              Labels: bulk-closed
>
> val df1 = Seq((1, 3), (2, 1)).toDF("keyCol1", "keyCol2")
> val df2 = Seq((1, 4), (2, 1)).toDF("keyCol1", "keyCol3")
> val df3 = df1.join(df2, df1("keyCol1") === df2("keyCol1")).select(df1("keyCol1"), $"keyCol3")
> df3.join(df1, df3("keyCol3") === df1("keyCol1")).show()
> The above query returns an empty result set. 
> However, the correct result should be (2,1,1,3). 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org