Class AbstractIndexPlanGenerator
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
- Direct Known Subclasses:
CoveringIndexPlanGenerator
,CoveringPlanNoFilterGenerator
,IndexIntersectPlanGenerator
,NonCoveringIndexPlanGenerator
public abstract class AbstractIndexPlanGenerator
extends SubsetTransformer<org.apache.calcite.rel.RelNode,org.apache.calcite.rel.InvalidRelException>
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.calcite.rex.RexBuilder
protected final org.apache.calcite.rex.RexNode
protected final IndexCallContext
protected final DrillProjectRelBase
protected final DrillScanRelBase
protected final org.apache.calcite.rex.RexNode
protected final PlannerSettings
protected final DrillProjectRelBase
-
Constructor Summary
ConstructorDescriptionAbstractIndexPlanGenerator
(IndexCallContext indexContext, org.apache.calcite.rex.RexNode indexCondition, org.apache.calcite.rex.RexNode remainderCondition, org.apache.calcite.rex.RexBuilder builder, PlannerSettings settings) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkRowKey
(List<SchemaPath> columns) abstract org.apache.calcite.rel.RelNode
convertChild
(org.apache.calcite.rel.RelNode current, org.apache.calcite.rel.RelNode child) protected org.apache.calcite.rel.type.RelDataType
convertRowType
(org.apache.calcite.rel.type.RelDataType origRowType, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) protected org.apache.calcite.rel.RelNode
createRangeDistRight
(org.apache.calcite.rel.RelNode rightPrel, org.apache.calcite.rel.type.RelDataTypeField rightRowKeyField, DbGroupScan origDbGroupScan) boolean
static org.apache.calcite.rel.RelNode
getExchange
(org.apache.calcite.plan.RelOptCluster cluster, boolean isSingleton, boolean isExchangeRequired, org.apache.calcite.plan.RelTraitSet traits, DrillDistributionTrait distributionTrait, IndexCallContext indexContext, org.apache.calcite.rel.RelNode input) static int
getRowKeyIndex
(org.apache.calcite.rel.type.RelDataType rowType, DrillScanRelBase origScan) static org.apache.calcite.rel.RelNode
getSortNode
(IndexCallContext indexContext, org.apache.calcite.rel.RelNode newRel, boolean donotGenerateSort, boolean isSingleton, boolean isExchangeRequired) void
go()
org.apache.calcite.plan.RelTraitSet
newTraitSet
(org.apache.calcite.plan.RelTrait... traits) protected static boolean
toRemoveSort
(org.apache.calcite.rel.RelCollation sortCollation, org.apache.calcite.rel.RelCollation inputCollation) Methods inherited from class org.apache.drill.exec.planner.physical.SubsetTransformer
go
-
Field Details
-
origProject
-
origScan
-
upperProject
-
indexCondition
protected final org.apache.calcite.rex.RexNode indexCondition -
remainderCondition
protected final org.apache.calcite.rex.RexNode remainderCondition -
builder
protected final org.apache.calcite.rex.RexBuilder builder -
indexContext
-
settings
-
-
Constructor Details
-
AbstractIndexPlanGenerator
public AbstractIndexPlanGenerator(IndexCallContext indexContext, org.apache.calcite.rex.RexNode indexCondition, org.apache.calcite.rex.RexNode remainderCondition, org.apache.calcite.rex.RexBuilder builder, PlannerSettings settings)
-
-
Method Details
-
getRowKeyIndex
public static int getRowKeyIndex(org.apache.calcite.rel.type.RelDataType rowType, DrillScanRelBase origScan) -
convertRowType
protected org.apache.calcite.rel.type.RelDataType convertRowType(org.apache.calcite.rel.type.RelDataType origRowType, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) -
checkRowKey
-
createRangeDistRight
protected org.apache.calcite.rel.RelNode createRangeDistRight(org.apache.calcite.rel.RelNode rightPrel, org.apache.calcite.rel.type.RelDataTypeField rightRowKeyField, DbGroupScan origDbGroupScan) -
newTraitSet
public org.apache.calcite.plan.RelTraitSet newTraitSet(org.apache.calcite.plan.RelTrait... traits) - Overrides:
newTraitSet
in classSubsetTransformer<org.apache.calcite.rel.RelNode,
org.apache.calcite.rel.InvalidRelException>
-
toRemoveSort
protected static boolean toRemoveSort(org.apache.calcite.rel.RelCollation sortCollation, org.apache.calcite.rel.RelCollation inputCollation) -
getExchange
public static org.apache.calcite.rel.RelNode getExchange(org.apache.calcite.plan.RelOptCluster cluster, boolean isSingleton, boolean isExchangeRequired, org.apache.calcite.plan.RelTraitSet traits, DrillDistributionTrait distributionTrait, IndexCallContext indexContext, org.apache.calcite.rel.RelNode input) -
getSortNode
public static org.apache.calcite.rel.RelNode getSortNode(IndexCallContext indexContext, org.apache.calcite.rel.RelNode newRel, boolean donotGenerateSort, boolean isSingleton, boolean isExchangeRequired) -
convertChild
public abstract org.apache.calcite.rel.RelNode convertChild(org.apache.calcite.rel.RelNode current, org.apache.calcite.rel.RelNode child) throws org.apache.calcite.rel.InvalidRelException - Specified by:
convertChild
in classSubsetTransformer<org.apache.calcite.rel.RelNode,
org.apache.calcite.rel.InvalidRelException> - Throws:
org.apache.calcite.rel.InvalidRelException
-
forceConvert
public boolean forceConvert()- Overrides:
forceConvert
in classSubsetTransformer<org.apache.calcite.rel.RelNode,
org.apache.calcite.rel.InvalidRelException>
-
go
public void go() throws org.apache.calcite.rel.InvalidRelException- Throws:
org.apache.calcite.rel.InvalidRelException
-