public class IndexSelector extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IndexSelector.DrillIndexProperties
IndexProperties encapsulates the various metrics of a single index that are related to
the current query.
|
static class |
IndexSelector.IndexComparator |
Constructor and Description |
---|
IndexSelector(IndexCallContext indexContext)
This constructor is to build selector for no index condition case (no filter)
|
IndexSelector(org.apache.calcite.rex.RexNode indexCondition,
org.apache.calcite.rex.RexNode otherRemainderCondition,
IndexCallContext indexContext,
IndexCollection collection,
org.apache.calcite.rex.RexBuilder rexBuilder,
double totalRows) |
Modifier and Type | Method and Description |
---|---|
void |
addIndex(IndexDescriptor indexDesc,
boolean isCovering,
int numProjectedFields) |
void |
analyzePrefixMatches(IndexProperties indexProps)
This method analyzes an index's columns and starting from the first column, checks
which part of the filter condition matches that column.
|
IndexProperties |
getBestIndexNoFilter()
we assume all the indexes added in indexPropList are all applicable (and covering).
|
void |
getCandidateIndexes(IndexConditionInfo.Builder infoBuilder,
List<IndexGroup> coveringIndexes,
List<IndexGroup> nonCoveringIndexes,
List<IndexGroup> intersectIndexes)
Run the index selection algorithm and return the top N indexes
|
public IndexSelector(org.apache.calcite.rex.RexNode indexCondition, org.apache.calcite.rex.RexNode otherRemainderCondition, IndexCallContext indexContext, IndexCollection collection, org.apache.calcite.rex.RexBuilder rexBuilder, double totalRows)
public IndexSelector(IndexCallContext indexContext)
indexContext
- public void addIndex(IndexDescriptor indexDesc, boolean isCovering, int numProjectedFields)
public void analyzePrefixMatches(IndexProperties indexProps)
indexProps
- public void getCandidateIndexes(IndexConditionInfo.Builder infoBuilder, List<IndexGroup> coveringIndexes, List<IndexGroup> nonCoveringIndexes, List<IndexGroup> intersectIndexes)
public IndexProperties getBestIndexNoFilter()
Copyright © 1970 The Apache Software Foundation. All rights reserved.