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
ConstructorsConstructorDescriptionDrillIndexProperties(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 TypeMethodDescriptiondoubleorg.apache.calcite.plan.RelOptCostgetIntersectCost(IndexGroup index, IndexConditionInfo.Builder builder, org.apache.calcite.plan.RelOptPlanner planner) org.apache.calcite.plan.RelOptCostgetIntersectCost(IndexGroup index, IndexConditionInfo.Builder builder, org.apache.calcite.plan.RelOptPlanner planner, PluginCost costBase, DrillScanRelBase scanRel) org.apache.calcite.rex.RexNodedoubledoubleorg.apache.calcite.plan.RelOptCostgetSelfCost(org.apache.calcite.plan.RelOptPlanner planner) org.apache.calcite.rex.RexNodedoublebooleanintorg.apache.calcite.rex.RexNoderemainderCondition(IndexDescriptor indexDesc, IndexConditionInfo.Builder builder, org.apache.calcite.rex.RexNode initCondition) booleanvoidsetProperties(Map<LogicalExpression, org.apache.calcite.rex.RexNode> prefixMap, boolean satisfiesCollation, org.apache.calcite.rex.RexNode indexColumnsRemainderFilter, Statistics stats) voidsetSatisfiesCollation(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:
setPropertiesin interfaceIndexProperties
-
getLeadingSelectivity
public double getLeadingSelectivity()- Specified by:
getLeadingSelectivityin interfaceIndexProperties
-
getRemainderSelectivity
public double getRemainderSelectivity()- Specified by:
getRemainderSelectivityin interfaceIndexProperties
-
isCovering
public boolean isCovering()- Specified by:
isCoveringin interfaceIndexProperties
-
getTotalRows
public double getTotalRows()- Specified by:
getTotalRowsin interfaceIndexProperties
-
getIndexDesc
- Specified by:
getIndexDescin interfaceIndexProperties
-
getLeadingColumnsFilter
public org.apache.calcite.rex.RexNode getLeadingColumnsFilter()- Specified by:
getLeadingColumnsFilterin interfaceIndexProperties
-
getTotalRemainderFilter
public org.apache.calcite.rex.RexNode getTotalRemainderFilter()- Specified by:
getTotalRemainderFilterin interfaceIndexProperties
-
satisfiesCollation
public boolean satisfiesCollation()- Specified by:
satisfiesCollationin interfaceIndexProperties
-
setSatisfiesCollation
public void setSatisfiesCollation(boolean satisfiesCollation) - Specified by:
setSatisfiesCollationin interfaceIndexProperties
-
getSelfCost
public org.apache.calcite.plan.RelOptCost getSelfCost(org.apache.calcite.plan.RelOptPlanner planner) - Specified by:
getSelfCostin interfaceIndexProperties
-
getIntersectCost
public org.apache.calcite.plan.RelOptCost getIntersectCost(IndexGroup index, IndexConditionInfo.Builder builder, org.apache.calcite.plan.RelOptPlanner planner) - Specified by:
getIntersectCostin interfaceIndexProperties
-
numLeadingFilters
public int numLeadingFilters()- Specified by:
numLeadingFiltersin interfaceIndexProperties
-
getAvgRowSize
public double getAvgRowSize()- Specified by:
getAvgRowSizein interfaceIndexProperties
-
getPrimaryTableScan
- Specified by:
getPrimaryTableScanin 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)
-