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

spark.sql.orc.filterPushdown=true breaks DataFrame where functionality

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.2, 2.0.0
    • 2.0.0
    • SQL
    • None

    Description

      When running spark-shell with the configuration "spark.sql.orc.filterPushdown=true", the DataFrame function where and filter have an error. In particular, "column is not null" fails.

      Example Code:

      import sqlContext.implicits._
      case class MyData(string_field: String, array_field: Seq[String])

      val myDataArray = Array(
      MyData("foo", Seq("bar")),
      MyData("foobar", null)
      )

      val myDataDF = sc.parallelize(myDataArray).toDF
      myDataDF.count // 2
      myDataDF.where("array_field is null").count // 1
      myDataDF.where("array_field is not null").count // 1

      myDataDF.write.format("orc").save("/tmp/mydata.orc")

      val myLoadedDataDF = sqlContext.read.format("orc").load("/tmp/mydata.orc")
      myLoadedDataDF.count // 2
      myLoadedDataDF.where("array_field is not null").count // 0 incorrect

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            jdfinsf Justin Foster
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: