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

Reply via email to