Interface IndexDescriptor
- All Superinterfaces:
IndexDefinition
- All Known Implementing Classes:
AbstractIndexDescriptor
,DrillIndexDescriptor
IndexDefinition + functions to access materialized index(index table/scan, etc)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.planner.index.IndexDefinition
IndexDefinition.IndexType
-
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 the functional index information associated with this index (Functional indexes are indexes involving expressions e.g CAST(a as INT).Get an instance of the group scan associated with this index descriptorGet the costing factors associated with the storage/format plugindouble
getRows
(org.apache.calcite.rel.RelNode input, 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 interface org.apache.drill.exec.planner.index.IndexDefinition
allColumnsIndexed, getCollation, getCollationMap, getIndexColumnOrdinal, getIndexColumns, getIndexName, getIndexType, getNonIndexColumns, getNullsOrderingDirection, getRowKeyColumns, getTableName, isCoveringIndex, someColumnsIndexed
-
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 tableindexCondition
- 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 queryplanner
- Planner instancenumProjectedFields
- Number of projected fieldsprimaryGroupScan
- 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
-