Interface Metadata
- All Known Subinterfaces:
TableMetadata
- All Known Implementing Classes:
BaseMetadata
,BaseTableMetadata
,FileMetadata
,NonInterestingColumnsMetadata
,PartitionMetadata
,RowGroupMetadata
,SegmentMetadata
public interface Metadata
Provider of tuple schema, column metadata, and statistics for table, partition, file or row group.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsExactStatistics
(StatisticsKind<?> statisticsKind) Checks whether specified statistics kind is set in this non-column statistics and it corresponds to the exact statistics value.getColumn
(SchemaPath name) Returns metadata description for the specified columnReturns statistics stored in current metadata represented as Map of columnSchemaPath
s and correspondingColumnStatistics
.getColumnStatistics
(SchemaPath columnName) Returns statistics for specified column stored in current metadata.Returns schema stored in current metadata represented asTupleMetadata
.<V> V
getStatistic
(StatisticsKind<V> statisticsKind) Returns value of non-column statistics which corresponds to specifiedStatisticsKind
.<V> V
getStatisticsForColumn
(SchemaPath columnName, StatisticsKind<V> statisticsKind) Returns value of column statistics which corresponds to specifiedStatisticsKind
for column with specifiedcolumnName
.ConvertsMetadata
implementation intoTableMetadataUnit
instance which will be used to write data into Drill Metastore Tables.
-
Method Details
-
getColumnsStatistics
Map<SchemaPath,ColumnStatistics<?>> getColumnsStatistics()Returns statistics stored in current metadata represented as Map of columnSchemaPath
s and correspondingColumnStatistics
.- Returns:
- statistics stored in current metadata
-
getColumnStatistics
Returns statistics for specified column stored in current metadata.- Parameters:
columnName
- column whose statistics should be returned- Returns:
- statistics for specified column
-
getSchema
TupleMetadata getSchema()Returns schema stored in current metadata represented asTupleMetadata
.- Returns:
- schema stored in current metadata
-
getStatistic
Returns value of non-column statistics which corresponds to specifiedStatisticsKind
.- Parameters:
statisticsKind
- statistics kind whose value should be returned- Returns:
- value of non-column statistics
-
containsExactStatistics
Checks whether specified statistics kind is set in this non-column statistics and it corresponds to the exact statistics value.- Parameters:
statisticsKind
- statistics kind to check- Returns:
- true if value which corresponds to the specified statistics kind is exact
-
getStatisticsForColumn
Returns value of column statistics which corresponds to specifiedStatisticsKind
for column with specifiedcolumnName
.- Parameters:
columnName
- name of the columnstatisticsKind
- statistics kind whose value should be returned- Returns:
- value of column statistics
-
getColumn
Returns metadata description for the specified column- Parameters:
name
- column name, whose metadata type info should be returned- Returns:
ColumnMetadata
schema description of the column
-
getTableInfo
TableInfo getTableInfo() -
getMetadataInfo
MetadataInfo getMetadataInfo() -
toMetadataUnit
TableMetadataUnit toMetadataUnit()ConvertsMetadata
implementation intoTableMetadataUnit
instance which will be used to write data into Drill Metastore Tables.- Returns:
- metadata unit instance
-