vvysotskyi commented on a change in pull request #1552: DRILL-6865: Query
returns wrong result when filter pruning happens
URL: https://github.com/apache/drill/pull/1552#discussion_r235997009
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetPushDownFilter.java
##########
@@ -134,12 +132,29 @@ protected void doOnMatch(RelOptRuleCall call, FilterPrel
filter, ProjectPrel pro
// get a conjunctions of the filter condition. For each conjunction, if it
refers to ITEM or FLATTEN expression
// then we could not pushed down. Otherwise, it's qualified to be pushed
down.
- final List<RexNode> predList = RelOptUtil.conjunctions(condition);
+ final List<RexNode> predList =
RelOptUtil.conjunctions(RexUtil.toCnf(filter.getCluster().getRexBuilder(),
condition));
Review comment:
We need to convert initial expression to conjunctive normal form, so it will
be splitted into predicates more precisely and they will be divided into
predicates which are supported by parquet filter pushdown and predicates which
aren't.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services