Class NonCoveringIndexPlanGenerator
java.lang.Object
org.apache.drill.exec.planner.physical.SubsetTransformer<org.apache.calcite.rel.RelNode,org.apache.calcite.rel.InvalidRelException>
org.apache.drill.exec.planner.index.generators.AbstractIndexPlanGenerator
org.apache.drill.exec.planner.index.generators.NonCoveringIndexPlanGenerator
Generate a non-covering index plan that is equivalent to the original plan. The non-covering plan consists
of a join-back between an index lookup and the primary table. This join-back is performed using a rowkey join.
For the primary table, we use a restricted scan that allows doing skip-scan instead of sequential scan.
Original Plan:
Filter
|
DBGroupScan
New Plan:
RowKeyJoin
/ \
Remainder Filter Exchange
| |
Restricted Filter (with index columns only)
DBGroupScan |
IndexGroupScan
This plan will be further optimized by the filter pushdown rule of the Index plugin which should
push the index column filters into the index scan.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final FunctionalIndexInfo
protected final IndexGroupScan
Fields inherited from class org.apache.drill.exec.planner.index.generators.AbstractIndexPlanGenerator
builder, indexCondition, indexContext, origProject, origScan, remainderCondition, settings, upperProject
-
Constructor Summary
ConstructorDescriptionNonCoveringIndexPlanGenerator
(IndexLogicalPlanCallContext indexContext, IndexDescriptor indexDesc, IndexGroupScan indexGroupScan, org.apache.calcite.rex.RexNode indexCondition, org.apache.calcite.rex.RexNode remainderCondition, org.apache.calcite.rex.RexBuilder builder, PlannerSettings settings) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.rel.RelNode
convertChild
(org.apache.calcite.rel.RelNode topRel, org.apache.calcite.rel.RelNode input) Methods inherited from class org.apache.drill.exec.planner.index.generators.AbstractIndexPlanGenerator
checkRowKey, convertRowType, createRangeDistRight, forceConvert, getExchange, getRowKeyIndex, getSortNode, go, newTraitSet, toRemoveSort
Methods inherited from class org.apache.drill.exec.planner.physical.SubsetTransformer
go
-
Field Details
-
indexGroupScan
-
functionInfo
-
-
Constructor Details
-
NonCoveringIndexPlanGenerator
public NonCoveringIndexPlanGenerator(IndexLogicalPlanCallContext indexContext, IndexDescriptor indexDesc, IndexGroupScan indexGroupScan, org.apache.calcite.rex.RexNode indexCondition, org.apache.calcite.rex.RexNode remainderCondition, org.apache.calcite.rex.RexBuilder builder, PlannerSettings settings)
-
-
Method Details
-
convertChild
public org.apache.calcite.rel.RelNode convertChild(org.apache.calcite.rel.RelNode topRel, org.apache.calcite.rel.RelNode input) throws org.apache.calcite.rel.InvalidRelException - Specified by:
convertChild
in classAbstractIndexPlanGenerator
- Throws:
org.apache.calcite.rel.InvalidRelException
-