GitHub user PenguinToast opened a pull request:

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

    [SPARK-24879][SQL] Fix NPE in Hive partition pruning filter pushdown

    ## What changes were proposed in this pull request?
    We get a NPE when we have a filter on a partition column of the form `col 
in (x, null)`. This is due to the filter converter in HiveShim not handling 
`null`s correctly. This patch fixes this bug while still pushing down as much 
of the partition pruning predicates as possible, by filtering out `null`s from 
any `in` predicate. Since Hive only supports very simple partition pruning 
filters, this change should preserve correctness.
    
    ## How was this patch tested?
    Unit tests, manual tests


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

    $ git pull https://github.com/PenguinToast/spark partition-pruning-npe

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

    https://github.com/apache/spark/pull/21832.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 #21832
    
----
commit 388caa978ead4bb8957b5e41a20c394fc90fe234
Author: William Sheu <william.sheu@...>
Date:   2018-07-20T18:41:27Z

    Filter out `null` values for partition pruning predicates

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to