You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2021/05/21 09:23:00 UTC

[jira] [Resolved] (SPARK-35454) Ambiguous self-join doesn't fail after transfroming the dataset to dataframe

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

Wenchen Fan resolved SPARK-35454.
---------------------------------
    Fix Version/s: 3.2.0
                   3.1.2
         Assignee: wuyi
       Resolution: Fixed

> Ambiguous self-join doesn't fail after transfroming the dataset to dataframe
> ----------------------------------------------------------------------------
>
>                 Key: SPARK-35454
>                 URL: https://issues.apache.org/jira/browse/SPARK-35454
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.1.0, 3.1.1
>            Reporter: wuyi
>            Assignee: wuyi
>            Priority: Major
>             Fix For: 3.1.2, 3.2.0
>
>
> {code:java}
> test("SPARK-28344: fail ambiguous self join - Dataset.colRegex as column ref") {
>   val df1 = spark.range(3)
>   val df2 = df1.filter($"id" > 0)
>   withSQLConf(
>     SQLConf.FAIL_AMBIGUOUS_SELF_JOIN_ENABLED.key -> "true",
>     SQLConf.CROSS_JOINS_ENABLED.key -> "true") {
>     assertAmbiguousSelfJoin(df1.join(df2, df1.colRegex("id") > df2.colRegex("id")))
>   }
> }
> {code}
> For this unit test, if we append `.toDF()` to both df1 and df2, the query won't fail. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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