GitHub user HyukjinKwon opened a pull request:

    https://github.com/apache/spark/pull/12777

    [SPARK-14962][SQL] Do not push down isnotnull/isnull on unsuportted types.

    ## What changes were proposed in this pull request?
    
    https://issues.apache.org/jira/browse/SPARK-14962
    
    ORC filters were being pushed down for all types for both `IsNull` and 
`IsNotNull`.
    
    This is apparently OK because both `IsNull` and `IsNotNull` do not take a 
type as an argument (Hive 1.2.x) during building filters (`SearchArgument`)in 
Spark-side but they do not filter correctly because stored statistics always 
produces `null` for not supported types, eg `ArrayType` in ORC-side. So, it is 
always `true` for `IsNull` which ends up always `false` for `IsNotNull`.
    
    This looks prevented in Hive 1.3.x >= by forcing to give a type when 
building a filter (`SearchArgument`) but Hive 1.2.x seems not doing this. 
    
    This PR prevents ORC filter creation for `IsNull` and `IsNotNull` on 
unsupported types. `OrcFilters` resembles `ParquetFilters`.
    
    ## How was this patch tested?
    
    Unittests in `OrcQuerySuite` and `OrcFilterSuite` and `sbt scalastyle`.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/HyukjinKwon/spark SPARK-14962

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12777.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #12777
    
----
commit c959f7e3c88d150bb61e314c8a01559a685c1208
Author: hyukjinkwon <[email protected]>
Date:   2016-04-29T11:42:16Z

    Do not push down isnotnull/isnull on unsuportted types.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to