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_r235997054
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetPushDownFilter.java
##########
@@ -172,14 +170,30 @@ protected void doOnMatch(RelOptRuleCall call, FilterPrel
filter, ProjectPrel pro
Stopwatch timer = logger.isDebugEnabled() ? Stopwatch.createStarted() :
null;
- final GroupScan newGroupScan = groupScan.applyFilter(conditionExp,
optimizerContext,
+ AbstractParquetGroupScan newGroupScan =
groupScan.applyFilter(conditionExp, optimizerContext,
optimizerContext.getFunctionRegistry(),
optimizerContext.getPlannerSettings().getOptions());
if (timer != null) {
logger.debug("Took {} ms to apply filter on parquet row groups. ",
timer.elapsed(TimeUnit.MILLISECONDS));
timer.stop();
}
- if (newGroupScan == null ) {
+ if (newGroupScan == null) {
+ if (groupScan.isMatchAllRowGroups()) {
+ RelNode child = project == null ? scan : project;
+ // if current row group fully matches filter,
+ // but row group pruning wasn't happened, removes filter.
Review comment:
thanks, changed.
----------------------------------------------------------------
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