use of org.apache.drill.exec.store.plan.rel.PluginDrillTable in project drill by apache.
the class IcebergFormatMatcher method isReadable.
@Override
public DrillTable isReadable(DrillFileSystem fs, FileSelection selection, FileSystemPlugin fsPlugin, String storageEngineName, SchemaConfig schemaConfig) throws IOException {
Path selectionRoot = selection.getSelectionRoot();
Path metaDir = new Path(selectionRoot, METADATA_DIR_NAME);
if (fs.isDirectory(selectionRoot) && fs.exists(metaDir) && fs.isDirectory(metaDir)) {
FormatSelection formatSelection = new FormatSelection(formatPlugin.getConfig(), selection);
return new PluginDrillTable(fsPlugin, storageEngineName, schemaConfig.getUserName(), formatSelection, formatPlugin.getConvention());
}
return null;
}
Aggregations