Class IndexSelector.DrillIndexProperties
java.lang.Object
org.apache.drill.exec.planner.index.IndexSelector.DrillIndexProperties
- All Implemented Interfaces:
IndexProperties
- Enclosing class:
- IndexSelector
IndexProperties encapsulates the various metrics of a single index that are related to
the current query. These metrics are subsequently used to rank the index in comparison
with other indexes.
-
Constructor Summary
ConstructorDescriptionDrillIndexProperties
(IndexDescriptor indexDescriptor, boolean isCovering, org.apache.calcite.rex.RexNode otherColumnsRemainderFilter, org.apache.calcite.rex.RexBuilder rexBuilder, int numProjectedFields, double totalRows, DrillScanRelBase primaryTableScan) -
Method Summary
Modifier and TypeMethodDescriptiondouble
org.apache.calcite.plan.RelOptCost
getIntersectCost
(IndexGroup index, IndexConditionInfo.Builder builder, org.apache.calcite.plan.RelOptPlanner planner) org.apache.calcite.plan.RelOptCost
getIntersectCost
(IndexGroup index, IndexConditionInfo.Builder builder, org.apache.calcite.plan.RelOptPlanner planner, PluginCost costBase, DrillScanRelBase scanRel) org.apache.calcite.rex.RexNode
double
double
org.apache.calcite.plan.RelOptCost
getSelfCost
(org.apache.calcite.plan.RelOptPlanner planner) org.apache.calcite.rex.RexNode
double
boolean
int
org.apache.calcite.rex.RexNode
remainderCondition
(IndexDescriptor indexDesc, IndexConditionInfo.Builder builder, org.apache.calcite.rex.RexNode initCondition) boolean
void
setProperties
(Map<LogicalExpression, org.apache.calcite.rex.RexNode> prefixMap, boolean satisfiesCollation, org.apache.calcite.rex.RexNode indexColumnsRemainderFilter, Statistics stats) void
setSatisfiesCollation
(boolean satisfiesCollation)
-
Constructor Details
-
DrillIndexProperties
public DrillIndexProperties(IndexDescriptor indexDescriptor, boolean isCovering, org.apache.calcite.rex.RexNode otherColumnsRemainderFilter, org.apache.calcite.rex.RexBuilder rexBuilder, int numProjectedFields, double totalRows, DrillScanRelBase primaryTableScan)
-
-
Method Details
-
setProperties
public void setProperties(Map<LogicalExpression, org.apache.calcite.rex.RexNode> prefixMap, boolean satisfiesCollation, org.apache.calcite.rex.RexNode indexColumnsRemainderFilter, Statistics stats) - Specified by:
setProperties
in interfaceIndexProperties
-
getLeadingSelectivity
public double getLeadingSelectivity()- Specified by:
getLeadingSelectivity
in interfaceIndexProperties
-
getRemainderSelectivity
public double getRemainderSelectivity()- Specified by:
getRemainderSelectivity
in interfaceIndexProperties
-
isCovering
public boolean isCovering()- Specified by:
isCovering
in interfaceIndexProperties
-
getTotalRows
public double getTotalRows()- Specified by:
getTotalRows
in interfaceIndexProperties
-
getIndexDesc
- Specified by:
getIndexDesc
in interfaceIndexProperties
-
getLeadingColumnsFilter
public org.apache.calcite.rex.RexNode getLeadingColumnsFilter()- Specified by:
getLeadingColumnsFilter
in interfaceIndexProperties
-
getTotalRemainderFilter
public org.apache.calcite.rex.RexNode getTotalRemainderFilter()- Specified by:
getTotalRemainderFilter
in interfaceIndexProperties
-
satisfiesCollation
public boolean satisfiesCollation()- Specified by:
satisfiesCollation
in interfaceIndexProperties
-
setSatisfiesCollation
public void setSatisfiesCollation(boolean satisfiesCollation) - Specified by:
setSatisfiesCollation
in interfaceIndexProperties
-
getSelfCost
public org.apache.calcite.plan.RelOptCost getSelfCost(org.apache.calcite.plan.RelOptPlanner planner) - Specified by:
getSelfCost
in interfaceIndexProperties
-
getIntersectCost
public org.apache.calcite.plan.RelOptCost getIntersectCost(IndexGroup index, IndexConditionInfo.Builder builder, org.apache.calcite.plan.RelOptPlanner planner) - Specified by:
getIntersectCost
in interfaceIndexProperties
-
numLeadingFilters
public int numLeadingFilters()- Specified by:
numLeadingFilters
in interfaceIndexProperties
-
getAvgRowSize
public double getAvgRowSize()- Specified by:
getAvgRowSize
in interfaceIndexProperties
-
getPrimaryTableScan
- Specified by:
getPrimaryTableScan
in interfaceIndexProperties
-
getIntersectCost
public org.apache.calcite.plan.RelOptCost getIntersectCost(IndexGroup index, IndexConditionInfo.Builder builder, org.apache.calcite.plan.RelOptPlanner planner, PluginCost costBase, DrillScanRelBase scanRel) -
remainderCondition
public org.apache.calcite.rex.RexNode remainderCondition(IndexDescriptor indexDesc, IndexConditionInfo.Builder builder, org.apache.calcite.rex.RexNode initCondition)
-