Package org.apache.drill.exec.store.dfs

Examples of org.apache.drill.exec.store.dfs.FormatSelection


    @Override
    public FormatSelection isReadable(FileSelection selection) throws IOException {
      // TODO: we only check the first file for directory reading.  This is because
      if(selection.containsDirectories(fs)){
        if(isDirReadable(selection.getFirstPath(fs))){
          return new FormatSelection(plugin.getConfig(), selection);
        }
      }
      return super.isReadable(selection);
    }
View Full Code Here


    @Override
    public FormatSelection isReadable(FileSelection selection) throws IOException {
      // TODO: we only check the first file for directory reading.  This is because
      if(selection.containsDirectories(fs)){
        if(isDirReadable(selection.getFirstPath(fs))){
          return new FormatSelection(plugin.getConfig(), selection);
        }
      }
      return super.isReadable(selection);
    }
View Full Code Here

      }
    }

    if (newFiles.size() > 0) {
      FileSelection newFileSelection = new FileSelection(newFiles, origSelection.getSelection().selectionRoot, true);
      FormatSelection newFormatSelection = new FormatSelection(origSelection.getFormat(), newFileSelection);
      return newFormatSelection;
    }

    return origSelection;
  }
View Full Code Here

    DrillRel inputRel = projectRel != null ? projectRel : scanRel;

    PlannerSettings settings = PrelUtil.getPlannerSettings(call.getPlanner());
    DirPathBuilder builder = new DirPathBuilder(filterRel, inputRel, filterRel.getCluster().getRexBuilder(), new FileSystemPartitionDescriptor(settings.getFsPartitionColumnLabel()));

    FormatSelection origSelection = (FormatSelection)scanRel.getDrillTable().getSelection();
    FormatSelection newSelection = splitFilter(origSelection, builder);

    if (origSelection == newSelection) {
      return; // no directory filter was pushed down
    }

    try {
      FileGroupScan fgscan = ((FileGroupScan)scanRel.getGroupScan()).clone(newSelection.getSelection());
      PartitionPruningUtil.rewritePlan(call, filterRel, projectRel, scanRel, fgscan, builder);
    } catch (IOException e) {
      throw new DrillRuntimeException(e) ;
    }
  }
View Full Code Here

    @Override
    public FormatSelection isReadable(FileSelection selection) throws IOException {
      // TODO: we only check the first file for directory reading.  This is because
      if(selection.containsDirectories(fs)){
        if(isDirReadable(selection.getFirstPath(fs))){
          return new FormatSelection(plugin.getConfig(), selection);
        }
      }
      return super.isReadable(selection);
    }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.store.dfs.FormatSelection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.