Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/519#discussion_r70529269
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/partition/PruneScanRule.java
 ---
    @@ -143,6 +144,11 @@ public static final RelOptRule 
getDirFilterOnScan(OptimizerRulesContext optimize
       }
     
       protected void doOnMatch(RelOptRuleCall call, Filter filterRel, Project 
projectRel, TableScan scanRel) {
    +    if (wasAllPartitionsPruned) {
    --- End diff --
    
    I feel this flag may lead to scenarios where pruning does not happen when 
it should.  The flag is PruneScanRule's internal variable. The same rule could 
be applied to pruning for multiple tables.  So, if PruneScanRule turns on this 
flag for T1, then we might skip pruning logic for T2 later on, when this rule 
is fired.  


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

Reply via email to