Class AbstractIndexCollection
java.lang.Object
org.apache.drill.exec.planner.index.AbstractIndexCollection
- All Implemented Interfaces:
Iterable<IndexDescriptor>,IndexCollection
- Direct Known Subclasses:
DrillIndexCollection
public abstract class AbstractIndexCollection
extends Object
implements IndexCollection, Iterable<IndexDescriptor>
Abstract base class for Index collection (collection of Index descriptors)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.planner.index.IndexCollection
IndexCollection.IndexCollectionType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<IndexDescriptor> A set of indexes for a particular table -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddIndex(IndexDescriptor index) Add a new index to the collection.voidclearAll()Clears all entries from this index collectiondoublegetRows(org.apache.calcite.rex.RexNode indexCondition) Get the estimated row count for a single index conditionbooleanisColumnIndexed(SchemaPath path) Check if the field name is the leading key of any of the indexes in this collectioniterator()booleanremoveIndex(IndexDescriptor index) Remove an index (identified by table name and index name) from the collection.booleanWhether or not the index supports full-text search (to allow pushing down such filters)booleanWhether or not this index collection supports index selection (selecting an appropriate index out of multiple candidates).booleanWhether or not the index supports getting row count statisticsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.planner.index.IndexCollection
getGroupScan, getIndexCollectionTypeMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
indexes
A set of indexes for a particular table
-
-
Constructor Details
-
AbstractIndexCollection
public AbstractIndexCollection()
-
-
Method Details
-
addIndex
Description copied from interface:IndexCollectionAdd a new index to the collection. Return True if index was successfully added; False otherwise- Specified by:
addIndexin interfaceIndexCollection
-
removeIndex
Description copied from interface:IndexCollectionRemove an index (identified by table name and index name) from the collection. Return True if index was successfully removed; False otherwise- Specified by:
removeIndexin interfaceIndexCollection
-
clearAll
public void clearAll()Description copied from interface:IndexCollectionClears all entries from this index collection- Specified by:
clearAllin interfaceIndexCollection
-
supportsIndexSelection
public boolean supportsIndexSelection()Description copied from interface:IndexCollectionWhether or not this index collection supports index selection (selecting an appropriate index out of multiple candidates). Typically, external index collections such as Elasticsearch already have this capability while native secondary index collection may not have - in such cases, Drill needs to do the index selection.- Specified by:
supportsIndexSelectionin interfaceIndexCollection
-
getRows
public double getRows(org.apache.calcite.rex.RexNode indexCondition) Description copied from interface:IndexCollectionGet the estimated row count for a single index condition- Specified by:
getRowsin interfaceIndexCollection- Parameters:
indexCondition- 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:IndexCollectionWhether or not the index supports getting row count statistics- Specified by:
supportsRowCountStatsin interfaceIndexCollection- Returns:
- True if index supports getting row count, False otherwise
-
supportsFullTextSearch
public boolean supportsFullTextSearch()Description copied from interface:IndexCollectionWhether or not the index supports full-text search (to allow pushing down such filters)- Specified by:
supportsFullTextSearchin interfaceIndexCollection- Returns:
- True if index supports full-text search, False otherwise
-
isColumnIndexed
Description copied from interface:IndexCollectionCheck if the field name is the leading key of any of the indexes in this collection- Specified by:
isColumnIndexedin interfaceIndexCollection- Parameters:
path-- Returns:
- True if an appropriate index is found, False otherwise
-
iterator
- Specified by:
iteratorin interfaceIterable<IndexDescriptor>
-