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 Wed, 20 Jan 2016 19:08:53 GMT
Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/328#discussion_r50302251
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/FileSystemPartitionDescriptor.java
---
    @@ -84,9 +99,17 @@ public int getMaxHierarchyLevel() {
     
       @Override
       public GroupScan createNewGroupScan(List<String> newFiles) throws IOException
{
    -    final FileSelection newSelection = FileSelection.create(null, newFiles, getBaseTableLocation());
    -    final FileGroupScan newScan = ((FileGroupScan)scanRel.getGroupScan()).clone(newSelection);
    -    return newScan;
    +    if (scanRel instanceof DrillScanRel) {
    +      final FileSelection newFileSelection = new FileSelection(null, newFiles, getBaseTableLocation());
    +      final FileGroupScan newScan = ((FileGroupScan)((DrillScanRel)scanRel).getGroupScan()).clone(newFileSelection);
    +      return newScan;
    +    } else {
    +      throw new UnsupportedOperationException("Does not allow to get groupScan for EnumerableTableScan");
    --- End diff --
    
    The else condition could be anything other than DrillScanRel, so you need not mention
EnumerableTableScan. 


---
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