Predicate push-down bug?

2015-09-15 Thread Ravi Ravi
Turning on predicate pushdown for ORC datasources results in a
NoSuchElementException:

scala> val df = sqlContext.sql("SELECT name FROM people WHERE age < 15")
df: org.apache.spark.sql.DataFrame = [name: string]

scala> sqlContext.setConf("spark.sql.orc.filterPushdown", "*true*")

scala> df.explain
== Physical Plan ==
*java.util.NoSuchElementException*

Disabling the pushdown makes things work again:

scala> sqlContext.setConf("spark.sql.orc.filterPushdown", "*false*")

scala> df.explain
== Physical Plan ==
Project [name#6]
 Filter (age#7 < 15)
  Scan
OrcRelation[file:/home/mydir/spark-1.5.0-SNAPSHOT/test/people][name#6,age#7]

Have any of you run into this problem before? Is a fix available?

Thanks,
Ravi


Re: Predicate push-down bug?

2015-09-15 Thread Ram Sriharsha
Hi Ravi

This does look like a bug.. I have created a JIRA to track it here:

https://issues.apache.org/jira/browse/SPARK-10623

Ram

On Tue, Sep 15, 2015 at 10:47 AM, Ram Sriharsha 
wrote:

> Hi Ravi
>
> Can you share more details? What Spark version are you running?
>
> Ram
>
> On Tue, Sep 15, 2015 at 10:32 AM, Ravi Ravi 
> wrote:
>
>> Turning on predicate pushdown for ORC datasources results in a
>> NoSuchElementException:
>>
>> scala> val df = sqlContext.sql("SELECT name FROM people WHERE age < 15")
>> df: org.apache.spark.sql.DataFrame = [name: string]
>>
>> scala> sqlContext.setConf("spark.sql.orc.filterPushdown", "*true*")
>>
>> scala> df.explain
>> == Physical Plan ==
>> *java.util.NoSuchElementException*
>>
>> Disabling the pushdown makes things work again:
>>
>> scala> sqlContext.setConf("spark.sql.orc.filterPushdown", "*false*")
>>
>> scala> df.explain
>> == Physical Plan ==
>> Project [name#6]
>>  Filter (age#7 < 15)
>>   Scan
>> OrcRelation[file:/home/mydir/spark-1.5.0-SNAPSHOT/test/people][name#6,age#7]
>>
>> Have any of you run into this problem before? Is a fix available?
>>
>> Thanks,
>> Ravi
>>
>>
>