You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Styles (JIRA)" <ji...@apache.org> on 2017/06/27 20:25:00 UTC

[jira] [Commented] (SPARK-17091) ParquetFilters rewrite IN to OR of Eq

    [ https://issues.apache.org/jira/browse/SPARK-17091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16065413#comment-16065413 ] 

Michael Styles commented on SPARK-17091:
----------------------------------------

By not pushing the filter to Parquet, are we not preventing Parquet from skipping blocks during read operations? I have tests that show big improvements when applying this transformation.

For instance, I have a Parquet file with 162,456,394 rows which is sorted on column C1.

*IN Predicate*
{noformat}
df.filter[df['C1'].isin([42, 139])).collect()
{noformat}

*OR Predicate*
{noformat}
df.filter((df['C1'] == 42) | (df['C1'] == 139)).collect()
{noformat}

I'm seeing about a 50 -75 % improvement.

> ParquetFilters rewrite IN to OR of Eq
> -------------------------------------
>
>                 Key: SPARK-17091
>                 URL: https://issues.apache.org/jira/browse/SPARK-17091
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Andrew Duffy
>
> Past attempts at pushing down the InSet operation for Parquet relied on user-defined predicates. It would be simpler to rewrite an IN clause into the corresponding OR union of a set of equality conditions.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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