Class AbstractIndexDescriptor

java.lang.Object
org.apache.drill.exec.planner.index.DrillIndexDefinition
org.apache.drill.exec.planner.index.AbstractIndexDescriptor
All Implemented Interfaces:
IndexDefinition, IndexDescriptor
Direct Known Subclasses:
DrillIndexDescriptor

public abstract class AbstractIndexDescriptor extends DrillIndexDefinition implements IndexDescriptor
Abstract base class for an Index descriptor
  • Constructor Details

  • Method Details

    • getRows

      public double getRows(org.apache.calcite.rel.RelNode scan, org.apache.calcite.rex.RexNode indexCondition)
      Description copied from interface: IndexDescriptor
      Get the estimated row count for a single index condition
      Specified by:
      getRows in interface IndexDescriptor
      Parameters:
      scan - 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

      public boolean supportsRowCountStats()
      Description copied from interface: IndexDescriptor
      Whether or not the index supports getting row count statistics
      Specified by:
      supportsRowCountStats in interface IndexDescriptor
      Returns:
      True if index supports getting row count, False otherwise
    • getIndexGroupScan

      public IndexGroupScan getIndexGroupScan()
      Description copied from interface: IndexDescriptor
      Get an instance of the group scan associated with this index descriptor
      Specified by:
      getIndexGroupScan in interface IndexDescriptor
      Returns:
      An instance of group scan for this index
    • supportsFullTextSearch

      public boolean supportsFullTextSearch()
      Description copied from interface: IndexDescriptor
      Whether or not the index supports full-text search (to allow pushing down such filters)
      Specified by:
      supportsFullTextSearch in interface IndexDescriptor
      Returns:
      True if index supports full-text search, False otherwise
    • getCost

      public org.apache.calcite.plan.RelOptCost getCost(IndexProperties indexProps, org.apache.calcite.plan.RelOptPlanner planner, int numProjectedFields, GroupScan primaryGroupScan)
      Description copied from interface: IndexDescriptor
      Get the total cost of index access (I/O, CPU) in the context of the current query
      Specified by:
      getCost in interface IndexDescriptor
      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
    • isAsyncIndex

      public boolean isAsyncIndex()
      Description copied from interface: IndexDescriptor
      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.
      Specified by:
      isAsyncIndex in interface IndexDescriptor
      Returns:
      True if the index is maintained asynchronously, False otherwise