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
-
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) ReturnsMetadataInfoCollector
instance 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 specifiedDrillTable
table.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:AnalyzeInfoProvider
Returns list of segment column names for specifiedDrillTable
table.- Specified by:
getSegmentColumns
in 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:AnalyzeInfoProvider
Returns list of fields required for ANALYZE.- Specified by:
getProjectionFields
in 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:AnalyzeInfoProvider
ReturnsMetadataInfoCollector
instance for obtaining information about segments, files, etc. which should be handled in metastore.- Specified by:
getMetadataInfoCollector
in 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:
MetadataInfoCollector
instance- Throws:
IOException
-
getLocationField
Description copied from interface:AnalyzeInfoProvider
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`.- Specified by:
getLocationField
in interfaceAnalyzeInfoProvider
- Parameters:
columnNamesOptions
- column names option values- Returns:
- location field
-
getParentLocationExpression
Description copied from interface:AnalyzeInfoProvider
Returns 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:
getParentLocationExpression
in interfaceAnalyzeInfoProvider
- Parameters:
locationField
- location field- Returns:
- expression to determine parent location
-