GitHub user viirya opened a pull request:

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

    [SPARK-10841][SQL] Add pushdown support of UDF for Parquet

    JIRA: https://issues.apache.org/jira/browse/SPARK-10841
    
    Currently we can't push down filters involving UDFs to Parquet. In 
practice, we have some usage of UDFs in filters, e.g.,
    
         SELECT * FROM table WHERE udf(customer_id) = "ABC"
    
    In above query, `customer_id` is a column storing customer id in some way. 
`udf` is a function used to parse this column to string value. Without pushing 
down the filter to Parquet, we will fetch all data from many Parquet files and 
then perform filtering in Spark.
    
    Using Parquet's `UserDefinedPredicate`, we can push down these filters to 
Parquet. This patch adds the support for this. This patch currently only 
implements `EqualTo` predicate. Other predicates such as `LessThan`, 
`GreaterThan` will be implemented in following PRs.


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

    $ git pull https://github.com/viirya/spark-1 parquet-udf-pushdown

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

    https://github.com/apache/spark/pull/8922.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 #8922
    
----
commit a673e789325ee40ee0e519bb48a5a3aa184c67c8
Author: Liang-Chi Hsieh <[email protected]>
Date:   2015-09-26T07:39:23Z

    Add pushdown support of UDF for parquet.

----


---
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