Uses of Interface
org.apache.drill.exec.planner.index.IndexCallContext
Packages that use IndexCallContext
Package
Description
-
Uses of IndexCallContext in org.apache.drill.exec.planner.index
Classes in org.apache.drill.exec.planner.index that implement IndexCallContextModifier and TypeClassDescriptionclassclassMethods in org.apache.drill.exec.planner.index with parameters of type IndexCallContextModifier and TypeMethodDescriptionstatic org.apache.calcite.rel.RelCollationIndexPlanUtils.buildCollationCoveringIndexScan(IndexDescriptor indexDesc, IndexCallContext context) Build the collation property for index scanstatic org.apache.calcite.rel.RelCollationIndexPlanUtils.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.RelCollationIndexPlanUtils.buildCollationNonCoveringIndexScan(IndexDescriptor indexDesc, org.apache.calcite.rel.type.RelDataType indexScanRowType, org.apache.calcite.rel.type.RelDataType restrictedScanRowType, IndexCallContext context) static org.apache.calcite.rel.RelCollationIndexPlanUtils.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 ScanPrelIndexPlanUtils.buildCoveringIndexScan(DrillScanRelBase origScan, IndexGroupScan indexGroupScan, IndexCallContext indexContext, IndexDescriptor indexDesc) booleanStatistics.initialize(org.apache.calcite.rex.RexNode condition, DrillScanRelBase scanRel, IndexCallContext context) static booleanIndexPlanUtils.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.RexNodeIndexPlanUtils.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.RelDataTypeFunctionalIndexHelper.rewriteFunctionalRowType(org.apache.calcite.rel.RelNode origScan, IndexCallContext indexContext, FunctionalIndexInfo functionInfo) static org.apache.calcite.rel.type.RelDataTypeFunctionalIndexHelper.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 voidIndexPlanUtils.updateSortExpression(IndexCallContext indexContext, List<org.apache.calcite.rel.RelFieldCollation> coll) generate logical expressions for sort rexNodes in SortRel, the result is store to IndexPlanCallContextConstructors in org.apache.drill.exec.planner.index with parameters of type IndexCallContextModifierConstructorDescriptionIndexSelector(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
Fields in org.apache.drill.exec.planner.index.generators declared as IndexCallContextModifier and TypeFieldDescriptionprotected final IndexCallContextAbstractIndexPlanGenerator.indexContextMethods in org.apache.drill.exec.planner.index.generators with parameters of type IndexCallContextModifier and TypeMethodDescriptionstatic org.apache.calcite.rel.RelNodeAbstractIndexPlanGenerator.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.RelNodeAbstractIndexPlanGenerator.getSortNode(IndexCallContext indexContext, org.apache.calcite.rel.RelNode newRel, boolean donotGenerateSort, boolean isSingleton, boolean isExchangeRequired) Constructors in org.apache.drill.exec.planner.index.generators with parameters of type IndexCallContextModifierConstructorDescriptionAbstractIndexPlanGenerator(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)