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 Details

    • getColumnsStatistics

      Map<SchemaPath,ColumnStatistics<?>> getColumnsStatistics()
      Returns statistics stored in current metadata represented as Map of column SchemaPaths and corresponding ColumnStatistics.
      Returns:
      statistics stored in current metadata
    • getColumnStatistics

      ColumnStatistics<?> getColumnStatistics(SchemaPath columnName)
      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 as TupleMetadata.
      Returns:
      schema stored in current metadata
    • getStatistic

      <V> V getStatistic(StatisticsKind<V> statisticsKind)
      Returns value of non-column statistics which corresponds to specified StatisticsKind.
      Parameters:
      statisticsKind - statistics kind whose value should be returned
      Returns:
      value of non-column statistics
    • containsExactStatistics

      boolean containsExactStatistics(StatisticsKind<?> statisticsKind)
      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

      <V> V getStatisticsForColumn(SchemaPath columnName, StatisticsKind<V> statisticsKind)
      Returns value of column statistics which corresponds to specified StatisticsKind for column with specified columnName.
      Parameters:
      columnName - name of the column
      statisticsKind - statistics kind whose value should be returned
      Returns:
      value of column statistics
    • getColumn

      ColumnMetadata getColumn(SchemaPath name)
      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()
      Converts Metadata implementation into TableMetadataUnit instance which will be used to write data into Drill Metastore Tables.
      Returns:
      metadata unit instance