Interface AnalyzeInfoProvider
- All Known Implementing Classes:
AnalyzeFileInfoProvider,AnalyzeFileInfoProviderImpl,AnalyzeParquetInfoProvider
public interface AnalyzeInfoProvider
Interface for obtaining information required for analyzing tables such as table segment columns, etc.
-
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.Returns table type name supported by thisAnalyzeInfoProvider.booleansupportsGroupScan(GroupScan groupScan) Checks whether thisAnalyzeInfoProvidersupports specifiedGroupScantype.booleansupportsMetadataType(MetadataType metadataType) Checks whether thisAnalyzeInfoProvidersupports specifiedMetadataType.
-
Method Details
-
getSegmentColumns
List<SchemaPath> getSegmentColumns(DrillTable table, ColumnNamesOptions columnNamesOptions) throws IOException Returns list of segment column names for specifiedDrillTabletable.- Parameters:
table- table for which should be returned segment column namescolumnNamesOptions- column names option values- Returns:
- list of segment column names
- Throws:
IOException
-
getProjectionFields
List<SchemaPath> getProjectionFields(DrillTable table, MetadataType metadataLevel, ColumnNamesOptions columnNamesOptions) throws IOException Returns list of fields required for ANALYZE.- Parameters:
table- drill tablemetadataLevel- metadata level for analyzecolumnNamesOptions- column names option values- Returns:
- list of fields required for ANALYZE
- Throws:
IOException
-
getMetadataInfoCollector
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 ReturnsMetadataInfoCollectorinstance for obtaining information about segments, files, etc. which should be handled in metastore.- 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
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`.- Parameters:
columnNamesOptions- column names option values- Returns:
- location field
-
getParentLocationExpression
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.- Parameters:
locationField- location field- Returns:
- expression to determine parent location
-
supportsGroupScan
Checks whether thisAnalyzeInfoProvidersupports specifiedGroupScantype.- Parameters:
groupScan- group scan- Returns:
trueif thisAnalyzeInfoProvidersupports specifiedGroupScantype
-
getTableTypeName
String getTableTypeName()Returns table type name supported by thisAnalyzeInfoProvider.- Returns:
- table type name
-
supportsMetadataType
Checks whether thisAnalyzeInfoProvidersupports specifiedMetadataType.- Parameters:
metadataType- metadata type- Returns:
trueif thisAnalyzeInfoProvidersupports specifiedMetadataType
-