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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.planner.index.IndexDefinition
IndexDefinition.IndexType
-
Field Summary
Fields inherited from class org.apache.drill.exec.planner.index.DrillIndexDefinition
allIndexColumns, indexCollationContext, indexColumns, indexName, indexType, nonIndexColumns, nullsDirection, rowKeyColumns, tableName
-
Constructor Summary
ConstructorDescriptionAbstractIndexDescriptor
(List<LogicalExpression> indexCols, CollationContext indexCollationContext, List<LogicalExpression> nonIndexCols, List<LogicalExpression> rowKeyColumns, String indexName, String tableName, IndexDefinition.IndexType type, org.apache.calcite.rel.RelFieldCollation.NullDirection nullsDirection) -
Method Summary
Modifier and TypeMethodDescriptionorg.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 queryGet an instance of the group scan associated with this index descriptordouble
getRows
(org.apache.calcite.rel.RelNode scan, org.apache.calcite.rex.RexNode indexCondition) Get the estimated row count for a single index conditionboolean
Whether this index is maintained synchronously (i.e primary table updates are propagated to the index synchronously) or asynchronously with some delay.boolean
Whether or not the index supports full-text search (to allow pushing down such filters)boolean
Whether or not the index supports getting row count statisticsMethods inherited from class org.apache.drill.exec.planner.index.DrillIndexDefinition
allColumnsIndexed, columnsInIndexFields, equals, getCollation, getCollationMap, getIndexColumnOrdinal, getIndexColumns, getIndexName, getIndexType, getNonIndexColumns, getNullsOrderingDirection, getRowKeyColumns, getTableName, hashCode, isCoveringIndex, pathExactIn, someColumnsIndexed, someColumnsInIndexFields, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.planner.index.IndexDefinition
allColumnsIndexed, getCollation, getCollationMap, getIndexColumnOrdinal, getIndexColumns, getIndexName, getIndexType, getNonIndexColumns, getNullsOrderingDirection, getRowKeyColumns, getTableName, isCoveringIndex, someColumnsIndexed
Methods inherited from interface org.apache.drill.exec.planner.index.IndexDescriptor
getFunctionalInfo, getPluginCostModel
-
Constructor Details
-
AbstractIndexDescriptor
public AbstractIndexDescriptor(List<LogicalExpression> indexCols, CollationContext indexCollationContext, List<LogicalExpression> nonIndexCols, List<LogicalExpression> rowKeyColumns, String indexName, String tableName, IndexDefinition.IndexType type, org.apache.calcite.rel.RelFieldCollation.NullDirection nullsDirection)
-
-
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 interfaceIndexDescriptor
- Parameters:
scan
- The rel node corresponding to the primary tableindexCondition
- 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 interfaceIndexDescriptor
- Returns:
- True if index supports getting row count, False otherwise
-
getIndexGroupScan
Description copied from interface:IndexDescriptor
Get an instance of the group scan associated with this index descriptor- Specified by:
getIndexGroupScan
in interfaceIndexDescriptor
- 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 interfaceIndexDescriptor
- 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 interfaceIndexDescriptor
- Parameters:
indexProps
- properties (metrics) of a single index in the context of current queryplanner
- Planner instancenumProjectedFields
- Number of projected fieldsprimaryGroupScan
- 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 interfaceIndexDescriptor
- Returns:
- True if the index is maintained asynchronously, False otherwise
-