drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansinha100 <...@git.apache.org>
Subject [GitHub] drill pull request: Drill 2517: Apply directory-based partition pr...
Date Mon, 25 Jan 2016 06:27:24 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message