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

    https://github.com/apache/drill/pull/328#discussion_r50657159
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/partition/PruneScanRule.java
 ---
    @@ -382,5 +381,28 @@ protected OptimizerRulesContext 
getOptimizerRulesContext() {
         return optimizerContext;
       }
     
    -  public abstract PartitionDescriptor 
getPartitionDescriptor(PlannerSettings settings, DrillScanRel scanRel);
    +  public abstract PartitionDescriptor 
getPartitionDescriptor(PlannerSettings settings, TableScan scanRel);
    +
    +  private static boolean isQualifiedDirPruning(final TableScan scan) {
    +    if (scan instanceof EnumerableTableScan) {
    +      DrillTable drillTable;
    +      drillTable = scan.getTable().unwrap(DrillTable.class);
    +      if (drillTable == null) {
    +        drillTable = 
scan.getTable().unwrap(DrillTranslatableTable.class).getDrillTable();
    +      }
    +      final Object selection = drillTable.getSelection();
    --- End diff --
    
    Would be good to assert drillTable != null or put an if() condition. 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to