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

Incorrect result caused by the rule OptimizeMetadataOnlyQuery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0, 2.1.2, 2.2.1, 2.3.0
    • 2.3.1, 2.4.0
    • SQL

    Description

       val tablePath = new File(s"${path.getCanonicalPath}/cOl3=c/cOl1=a/cOl5=e")
       Seq(("a", "b", "c", "d", "e")).toDF("cOl1", "cOl2", "cOl3", "cOl4", "cOl5")
       .write.json(tablePath.getCanonicalPath)
       val df = spark.read.json(path.getCanonicalPath).select("CoL1", "CoL5", "CoL3").distinct()
       df.show()
      

      This returns a wrong result
      [c,e,a]

      Attachments

        Issue Links

          Activity

            People

              smilegator Xiao Li
              smilegator Xiao Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: