Interface IndexDescriptor

All Superinterfaces:
IndexDefinition
All Known Implementing Classes:
AbstractIndexDescriptor, DrillIndexDescriptor

public interface IndexDescriptor extends IndexDefinition
IndexDefinition + functions to access materialized index(index table/scan, etc)
  • Method Details

    • getRows

      double getRows(org.apache.calcite.rel.RelNode input, org.apache.calcite.rex.RexNode indexCondition)
      Get the estimated row count for a single index condition
      Parameters:
      input - The rel node corresponding to the primary table
      indexCondition - The index condition (e.g index_col1 < 10 AND index_col2 = 'abc')
      Returns:
      The estimated row count
    • supportsRowCountStats

      boolean supportsRowCountStats()
      Whether or not the index supports getting row count statistics
      Returns:
      True if index supports getting row count, False otherwise
    • getIndexGroupScan

      IndexGroupScan getIndexGroupScan()
      Get an instance of the group scan associated with this index descriptor
      Returns:
      An instance of group scan for this index
    • supportsFullTextSearch

      boolean supportsFullTextSearch()
      Whether or not the index supports full-text search (to allow pushing down such filters)
      Returns:
      True if index supports full-text search, False otherwise
    • getFunctionalInfo

      FunctionalIndexInfo getFunctionalInfo()
      Get the functional index information associated with this index (Functional indexes are indexes involving expressions e.g CAST(a as INT).
    • getCost

      org.apache.calcite.plan.RelOptCost getCost(IndexProperties indexProps, org.apache.calcite.plan.RelOptPlanner planner, int numProjectedFields, GroupScan primaryGroupScan)
      Get the total cost of index access (I/O, CPU) in the context of the current query
      Parameters:
      indexProps - properties (metrics) of a single index in the context of current query
      planner - Planner instance
      numProjectedFields - Number of projected fields
      primaryGroupScan - Primary table's GroupScan instance
      Returns:
      a RelOptCost instance representing the total cost
    • getPluginCostModel

      PluginCost getPluginCostModel()
      Get the costing factors associated with the storage/format plugin
    • isAsyncIndex

      boolean isAsyncIndex()
      Whether this index is maintained synchronously (i.e primary table updates are propagated to the index synchronously) or asynchronously with some delay. The latter is more common for distributed NoSQL databases.
      Returns:
      True if the index is maintained asynchronously, False otherwise