> On March 26, 2015, 4:08 a.m., Jacques Nadeau wrote: > > exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/partition/PruneScanRule.java, > > line 271 > > <https://reviews.apache.org/r/32523/diff/1/?file=906436#file906436line271> > > > > Shouldn't this be a new filter with the newCondition if canDropFilter > > and only include full filter in case that !canDropFilter?
We need to check for both canDropFilter and newCondition.isAlwaysTrue (this indicates all conjuncts were pushed). We never create a new FilterRel with new conditions - we always either copy the existing FilterRel or drop it completely. - Aman ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32523/#review77861 ----------------------------------------------------------- On March 26, 2015, 3:49 a.m., Aman Sinha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32523/ > ----------------------------------------------------------- > > (Updated March 26, 2015, 3:49 a.m.) > > > Review request for drill and Jacques Nadeau. > > > Bugs: DRILL-2568 > https://issues.apache.org/jira/browse/DRILL-2568 > > > Repository: drill-git > > > Description > ------- > > Drop the filter plan node if all conjuncts in the filter have been pushed as > part of partition pruning, except for the situation where the new set of > files is empty - we add a single file in that case, so the Filter is > preserved in that case. > > > Diffs > ----- > > > exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/partition/PruneScanRule.java > b8c9ebf > exec/java-exec/src/test/java/org/apache/drill/exec/expr/TestPrune.java > d15555e > > Diff: https://reviews.apache.org/r/32523/diff/ > > > Testing > ------- > > Manual inspection of Explain plans for several types of queries. Running > regression tests.. > > > Thanks, > > Aman Sinha > >
