spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liancheng <>
Subject [GitHub] spark pull request #16156: [SPARK-18539][SQL]: tolerate pushed-down filter o...
Date Mon, 05 Dec 2016 22:37:56 GMT
Github user liancheng commented on a diff in the pull request:
    --- Diff: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/
    @@ -107,7 +107,16 @@ public void initialize(InputSplit inputSplit, TaskAttemptContext
           footer = readFooter(configuration, file, range(split.getStart(), split.getEnd()));
           MessageType fileSchema = footer.getFileMetaData().getSchema();
           FilterCompat.Filter filter = getFilter(configuration);
    -      blocks = filterRowGroups(filter, footer.getBlocks(), fileSchema);
    +      try {
    +        blocks = filterRowGroups(filter, footer.getBlocks(), fileSchema);
    +      } catch (IllegalArgumentException e) {
    +        // In the case where a particular parquet files does not contain
    +        // the column(s) in the filter, we don't do filtering at this level
    +        // PARQUET-389 will resolve this issue in Parquet 1.9, which may be used
    +        // by future Spark versions. This is a workaround for current Spark version.
    +        // Also the assumption here is that the predicates will be applied later
    --- End diff --
    No matter filters are pushed down to Parquet reader or not, Spark will always apply all
the filters again at a higher level to ensure that all filters are applied as expected. Spark
treats data source filter push-down in a "best effort" manner.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message