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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: