Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-35454

Ambiguous self-join doesn't fail after transfroming the dataset to dataframe

Rank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0, 3.1.1
    • 3.2.0, 3.1.3
    • SQL
    • None

    Description

      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")))
        }
      }
      

      For this unit test, if we append `.toDF()` to both df1 and df2, the query won't fail. 

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Ngone51 wuyi
            Ngone51 wuyi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment