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) 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.Returns table type name supported by thisAnalyzeInfoProvider
.boolean
supportsGroupScan
(GroupScan groupScan) Checks whether thisAnalyzeInfoProvider
supports specifiedGroupScan
type.boolean
supportsMetadataType
(MetadataType metadataType) Checks whether thisAnalyzeInfoProvider
supports specifiedMetadataType
.
-
Method Details
-
getSegmentColumns
List<SchemaPath> getSegmentColumns(DrillTable table, ColumnNamesOptions columnNamesOptions) throws IOException Returns list of segment column names for specifiedDrillTable
table.- 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 ReturnsMetadataInfoCollector
instance 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:
MetadataInfoCollector
instance- 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 thisAnalyzeInfoProvider
supports specifiedGroupScan
type.- Parameters:
groupScan
- group scan- Returns:
true
if thisAnalyzeInfoProvider
supports specifiedGroupScan
type
-
getTableTypeName
String getTableTypeName()Returns table type name supported by thisAnalyzeInfoProvider
.- Returns:
- table type name
-
supportsMetadataType
Checks whether thisAnalyzeInfoProvider
supports specifiedMetadataType
.- Parameters:
metadataType
- metadata type- Returns:
true
if thisAnalyzeInfoProvider
supports specifiedMetadataType
-