Cheng Lian created PARQUET-173:
----------------------------------

             Summary: StatisticsFilter doesn't handle And properly
                 Key: PARQUET-173
                 URL: https://issues.apache.org/jira/browse/PARQUET-173
             Project: Parquet
          Issue Type: Bug
          Components: parquet-mr
    Affects Versions: 1.6.0rc2
            Reporter: Cheng Lian
            Priority: Blocker


I guess it's [a pretty straightforward 
mistake|https://github.com/apache/incubator-parquet-mr/blob/4bf9be34a87b51d07e0b0c9e74831bbcdbce0f74/parquet-hadoop/src/main/java/parquet/filter2/statisticslevel/StatisticsFilter.java#L225-L237]
 :)
{code}
  @Override
  public Boolean visit(And and) {
    return and.getLeft().accept(this) && and.getRight().accept(this);
  }

  @Override
  public Boolean visit(Or or) {
    // seems unintuitive to put an && not an || here
    // but we can only drop a chunk of records if we know that
    // both the left and right predicates agree that no matter what
    // we don't need this chunk.
    return or.getLeft().accept(this) && or.getRight().accept(this);
  }
{code}
The consequence is that a filter predicates like {{a > 10 && a < 20}} can never 
drop any row groups.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to