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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2, 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: SQL
    • Labels:
      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

            • Assignee:
              hyukjin.kwon Hyukjin Kwon
              Reporter:
              jdfinsf Justin Foster
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: