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 Details

    • getSegmentColumns

      List<SchemaPath> getSegmentColumns(DrillTable table, ColumnNamesOptions columnNamesOptions) throws IOException
      Returns list of segment column names for specified DrillTable table.
      Parameters:
      table - table for which should be returned segment column names
      columnNamesOptions - 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 table
      metadataLevel - metadata level for analyze
      columnNamesOptions - 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
      Returns MetadataInfoCollector instance for obtaining information about segments, files, etc. which should be handled in metastore.
      Parameters:
      basicRequests - Metastore tables data provider helper
      tableInfo - table info
      selection - format selection
      settings - planner settings
      tableScanSupplier - supplier for table scan
      interestingColumns - list of interesting columns
      metadataLevel - metadata level
      segmentColumnsCount - number of segment columns
      Returns:
      MetadataInfoCollector instance
      Throws:
      IOException
    • getLocationField

      SchemaPath getLocationField(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`.
      Parameters:
      columnNamesOptions - column names option values
      Returns:
      location field
    • getParentLocationExpression

      NamedExpression getParentLocationExpression(SchemaPath locationField)
      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

      boolean supportsGroupScan(GroupScan groupScan)
      Checks whether this AnalyzeInfoProvider supports specified GroupScan type.
      Parameters:
      groupScan - group scan
      Returns:
      true if this AnalyzeInfoProvider supports specified GroupScan type
    • getTableTypeName

      String getTableTypeName()
      Returns table type name supported by this AnalyzeInfoProvider.
      Returns:
      table type name
    • supportsMetadataType

      boolean supportsMetadataType(MetadataType metadataType)
      Checks whether this AnalyzeInfoProvider supports specified MetadataType.
      Parameters:
      metadataType - metadata type
      Returns:
      true if this AnalyzeInfoProvider supports specified MetadataType