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 Details

    • origProject

      protected final DrillProjectRelBase origProject
    • origScan

      protected final DrillScanRelBase origScan
    • upperProject

      protected final DrillProjectRelBase 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

      protected final IndexCallContext indexContext
    • settings

      protected final PlannerSettings 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

      protected boolean checkRowKey(List<SchemaPath> columns)
    • 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 class SubsetTransformer<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 class SubsetTransformer<org.apache.calcite.rel.RelNode,org.apache.calcite.rel.InvalidRelException>
      Throws:
      org.apache.calcite.rel.InvalidRelException
    • forceConvert

      public boolean forceConvert()
      Overrides:
      forceConvert in class SubsetTransformer<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