Uses of Interface
org.apache.drill.exec.planner.index.IndexCallContext
Package
Description
-
Uses of IndexCallContext in org.apache.drill.exec.planner.index
Modifier and TypeClassDescriptionclass
class
Modifier and TypeMethodDescriptionstatic org.apache.calcite.rel.RelCollation
IndexPlanUtils.buildCollationCoveringIndexScan
(IndexDescriptor indexDesc, IndexCallContext context) Build the collation property for index scanstatic org.apache.calcite.rel.RelCollation
IndexPlanUtils.buildCollationForExpressions
(Map<LogicalExpression, Integer> projectExprs, IndexDescriptor indexDesc, IndexCallContext context) Given index, compute the collations for a list of projected expressions(from Scan's rowType or Project's ) in the contextstatic org.apache.calcite.rel.RelCollation
IndexPlanUtils.buildCollationNonCoveringIndexScan
(IndexDescriptor indexDesc, org.apache.calcite.rel.type.RelDataType indexScanRowType, org.apache.calcite.rel.type.RelDataType restrictedScanRowType, IndexCallContext context) static org.apache.calcite.rel.RelCollation
IndexPlanUtils.buildCollationProject
(List<org.apache.calcite.rex.RexNode> projectRexs, DrillProjectRelBase project, org.apache.calcite.rel.RelNode input, FunctionalIndexInfo indexInfo, IndexCallContext context) Build collation property for project, the one closer to the Scanstatic ScanPrel
IndexPlanUtils.buildCoveringIndexScan
(DrillScanRelBase origScan, IndexGroupScan indexGroupScan, IndexCallContext indexContext, IndexDescriptor indexDesc) boolean
Statistics.initialize
(org.apache.calcite.rex.RexNode condition, DrillScanRelBase scanRel, IndexCallContext context) static boolean
IndexPlanUtils.isCoveringIndex
(IndexCallContext indexContext, FunctionalIndexInfo functionInfo) For a particular table scan for table T1 and an index on that table, find out if it is a covering indexstatic org.apache.calcite.rex.RexNode
IndexPlanUtils.rewriteFunctionalRex
(IndexCallContext indexContext, DrillParseContext parseContext, DrillProjectRelBase project, org.apache.calcite.rel.RelNode scan, org.apache.calcite.rex.RexNode toRewriteRex, org.apache.calcite.rel.type.RelDataType newRowType, FunctionalIndexInfo functionInfo) A RexNode forest with three RexNodes for expressions "cast(a.q as int) * 2, b+c, concat(a.q, " world")" on Scan RowType('a', 'b', 'c') will be like this: (0)Call:"*" Call:"concat" / \ / \ (1)Call:CAST 2 Call:"+" (5)Call:ITEM ' world' / \ / \ / \ (2)Call:ITEM TYPE:INT (3)$1 (4)$2 $0 'q' / \ $0 'q' So for above expressions, when visiting the RexNode trees using PathInExpr, we could mark indexed expressions in the trees, as shown in the diagram above are the node (1), then collect the schema paths in the indexed expression but found out of the indexed expression -- node (5), and other regular schema paths (3) (4)static org.apache.calcite.rel.type.RelDataType
FunctionalIndexHelper.rewriteFunctionalRowType
(org.apache.calcite.rel.RelNode origScan, IndexCallContext indexContext, FunctionalIndexInfo functionInfo) static org.apache.calcite.rel.type.RelDataType
FunctionalIndexHelper.rewriteFunctionalRowType
(org.apache.calcite.rel.RelNode origScan, IndexCallContext indexContext, FunctionalIndexInfo functionInfo, Collection<SchemaPath> addedPaths) if a field in rowType serves only the to-be-replaced column(s), we should replace it with new name "$1", otherwise we should keep this dataTypeField and add a new one for "$1"static void
IndexPlanUtils.updateSortExpression
(IndexCallContext indexContext, List<org.apache.calcite.rel.RelFieldCollation> coll) generate logical expressions for sort rexNodes in SortRel, the result is store to IndexPlanCallContextModifierConstructorDescriptionIndexSelector
(org.apache.calcite.rex.RexNode indexCondition, org.apache.calcite.rex.RexNode otherRemainderCondition, IndexCallContext indexContext, IndexCollection collection, org.apache.calcite.rex.RexBuilder rexBuilder, double totalRows) IndexSelector
(IndexCallContext indexContext) This constructor is to build selector for no index condition case (no filter) -
Uses of IndexCallContext in org.apache.drill.exec.planner.index.generators
Modifier and TypeFieldDescriptionprotected final IndexCallContext
AbstractIndexPlanGenerator.indexContext
Modifier and TypeMethodDescriptionstatic org.apache.calcite.rel.RelNode
AbstractIndexPlanGenerator.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 org.apache.calcite.rel.RelNode
AbstractIndexPlanGenerator.getSortNode
(IndexCallContext indexContext, org.apache.calcite.rel.RelNode newRel, boolean donotGenerateSort, boolean isSingleton, boolean isExchangeRequired) ModifierConstructorDescriptionAbstractIndexPlanGenerator
(IndexCallContext indexContext, org.apache.calcite.rex.RexNode indexCondition, org.apache.calcite.rex.RexNode remainderCondition, org.apache.calcite.rex.RexBuilder builder, PlannerSettings settings) CoveringPlanNoFilterGenerator
(IndexCallContext indexContext, FunctionalIndexInfo functionInfo, boolean isSingleton, PlannerSettings settings)