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

Do not output duplicated columns in star expansion of subquery alias of NATURAL/USING JOIN

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.3.0, 3.2.2
    • SQL
    • None

    Description

      A bug was introduced in https://issues.apache.org/jira/browse/SPARK-34527 such that the duplicated columns within a NATURAL/USING JOIN were output from the qualified star of a subquery alias. For example:

      val df1 = Seq((3, 8)).toDF("a", "b") 
      val df2 = Seq((8, 7)).toDF("b", "d") 
      val joinDF = df1.join(df2, "b")
      joinDF.alias("r").select("r.*")
      

      Outputs two duplicate `b` columns, instead of just one.

      Attachments

        Issue Links

          Activity

            People

              karenfeng Karen Feng
              karenfeng Karen Feng
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: