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

Unexpected results when the data schema and partition schema have the duplicate columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

          withTempPath { dir =>
            val basePath = dir.getCanonicalPath
            spark.range(0, 3).toDF("foo").write.parquet(new Path(basePath, "foo=1").toString)
            spark.range(0, 3).toDF("foo").write.parquet(new Path(basePath, "foo=a").toString)
            spark.read.parquet(basePath).show()
          }
      

      The result of the above case is

      +---+
      |foo|
      +---+
      |  1|
      |  1|
      |  a|
      |  a|
      |  1|
      |  a|
      +---+
      

      Attachments

        Activity

          People

            maropu Takeshi Yamamuro
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: