You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Justin Foster (JIRA)" <ji...@apache.org> on 2016/04/27 21:33:12 UTC

[jira] [Updated] (SPARK-14962) spark.sql.orc.filterPushdown=true breaks DataFrame where functionality

     [ https://issues.apache.org/jira/browse/SPARK-14962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Foster updated SPARK-14962:
----------------------------------
    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


  was:
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.where("array_field is not null").count // 2
myLoadedDataDF.where("array_field is not null").count // 0 incorrect



> spark.sql.orc.filterPushdown=true breaks DataFrame where functionality
> ----------------------------------------------------------------------
>
>                 Key: SPARK-14962
>                 URL: https://issues.apache.org/jira/browse/SPARK-14962
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.2
>            Reporter: Justin Foster
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org