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
ConstructorsConstructorDescriptionAbstractIndexDescriptor(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.RelOptCostgetCost(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 descriptordoublegetRows(org.apache.calcite.rel.RelNode scan, org.apache.calcite.rex.RexNode indexCondition) Get the estimated row count for a single index conditionbooleanWhether this index is maintained synchronously (i.e primary table updates are propagated to the index synchronously) or asynchronously with some delay.booleanWhether or not the index supports full-text search (to allow pushing down such filters)booleanWhether 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.drill.exec.planner.index.IndexDefinition
allColumnsIndexed, getCollation, getCollationMap, getIndexColumnOrdinal, getIndexColumns, getIndexName, getIndexType, getNonIndexColumns, getNullsOrderingDirection, getRowKeyColumns, getTableName, isCoveringIndex, someColumnsIndexedMethods 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:IndexDescriptorGet the estimated row count for a single index condition- Specified by:
getRowsin interfaceIndexDescriptor- Parameters:
scan- The rel node corresponding to the primary tableindexCondition- The index condition (e.g index_col1 invalid input: '<' 10 AND index_col2 = 'abc')- Returns:
- The estimated row count
-
supportsRowCountStats
public boolean supportsRowCountStats()Description copied from interface:IndexDescriptorWhether or not the index supports getting row count statistics- Specified by:
supportsRowCountStatsin interfaceIndexDescriptor- Returns:
- True if index supports getting row count, False otherwise
-
getIndexGroupScan
Description copied from interface:IndexDescriptorGet an instance of the group scan associated with this index descriptor- Specified by:
getIndexGroupScanin interfaceIndexDescriptor- Returns:
- An instance of group scan for this index
-
supportsFullTextSearch
public boolean supportsFullTextSearch()Description copied from interface:IndexDescriptorWhether or not the index supports full-text search (to allow pushing down such filters)- Specified by:
supportsFullTextSearchin 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:IndexDescriptorGet the total cost of index access (I/O, CPU) in the context of the current query- Specified by:
getCostin 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:IndexDescriptorWhether 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:
isAsyncIndexin interfaceIndexDescriptor- Returns:
- True if the index is maintained asynchronously, False otherwise
-