Class AnalyzeFileInfoProvider
java.lang.Object
org.apache.drill.exec.metastore.analyze.AnalyzeFileInfoProvider
- All Implemented Interfaces:
AnalyzeInfoProvider
- Direct Known Subclasses:
AnalyzeFileInfoProviderImpl,AnalyzeParquetInfoProvider
Implementation of
AnalyzeInfoProvider for file-based tables.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLocationField(ColumnNamesOptions columnNamesOptions) Provides schema path to field which will be used as a location for specific table data, for example, for file-based tables, it may be `fqn`.getMetadataInfoCollector(BasicTablesRequests basicRequests, TableInfo tableInfo, FormatSelection selection, PlannerSettings settings, Supplier<org.apache.calcite.rel.core.TableScan> tableScanSupplier, List<SchemaPath> interestingColumns, MetadataType metadataLevel, int segmentColumnsCount) ReturnsMetadataInfoCollectorinstance for obtaining information about segments, files, etc.getParentLocationExpression(SchemaPath locationField) Returns expression which may be used to determine parent location for specific table data, i.e.getProjectionFields(DrillTable table, MetadataType metadataLevel, ColumnNamesOptions columnNamesOptions) Returns list of fields required for ANALYZE.getSegmentColumns(DrillTable table, ColumnNamesOptions columnNamesOptions) Returns list of segment column names for specifiedDrillTabletable.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.metastore.analyze.AnalyzeInfoProvider
getTableTypeName, supportsGroupScan, supportsMetadataType
-
Constructor Details
-
AnalyzeFileInfoProvider
public AnalyzeFileInfoProvider()
-
-
Method Details
-
getSegmentColumns
public List<SchemaPath> getSegmentColumns(DrillTable table, ColumnNamesOptions columnNamesOptions) throws IOException Description copied from interface:AnalyzeInfoProviderReturns list of segment column names for specifiedDrillTabletable.- Specified by:
getSegmentColumnsin interfaceAnalyzeInfoProvider- Parameters:
table- table for which should be returned segment column namescolumnNamesOptions- column names option values- Returns:
- list of segment column names
- Throws:
IOException
-
getProjectionFields
public List<SchemaPath> getProjectionFields(DrillTable table, MetadataType metadataLevel, ColumnNamesOptions columnNamesOptions) throws IOException Description copied from interface:AnalyzeInfoProviderReturns list of fields required for ANALYZE.- Specified by:
getProjectionFieldsin interfaceAnalyzeInfoProvider- Parameters:
table- drill tablemetadataLevel- metadata level for analyzecolumnNamesOptions- column names option values- Returns:
- list of fields required for ANALYZE
- Throws:
IOException
-
getMetadataInfoCollector
public MetadataInfoCollector getMetadataInfoCollector(BasicTablesRequests basicRequests, TableInfo tableInfo, FormatSelection selection, PlannerSettings settings, Supplier<org.apache.calcite.rel.core.TableScan> tableScanSupplier, List<SchemaPath> interestingColumns, MetadataType metadataLevel, int segmentColumnsCount) throws IOException Description copied from interface:AnalyzeInfoProviderReturnsMetadataInfoCollectorinstance for obtaining information about segments, files, etc. which should be handled in metastore.- Specified by:
getMetadataInfoCollectorin interfaceAnalyzeInfoProvider- Parameters:
basicRequests- Metastore tables data provider helpertableInfo- table infoselection- format selectionsettings- planner settingstableScanSupplier- supplier for table scaninterestingColumns- list of interesting columnsmetadataLevel- metadata levelsegmentColumnsCount- number of segment columns- Returns:
MetadataInfoCollectorinstance- Throws:
IOException
-
getLocationField
Description copied from interface:AnalyzeInfoProviderProvides schema path to field which will be used as a location for specific table data, for example, for file-based tables, it may be `fqn`.- Specified by:
getLocationFieldin interfaceAnalyzeInfoProvider- Parameters:
columnNamesOptions- column names option values- Returns:
- location field
-
getParentLocationExpression
Description copied from interface:AnalyzeInfoProviderReturns expression which may be used to determine parent location for specific table data, i.e. segment location. For example, for file-based tables, such expression will be `parentPath` function call.- Specified by:
getParentLocationExpressionin interfaceAnalyzeInfoProvider- Parameters:
locationField- location field- Returns:
- expression to determine parent location
-