Uses of Interface
org.apache.drill.exec.planner.index.FunctionalIndexInfo
Packages that use FunctionalIndexInfo
Package
Description
-
Uses of FunctionalIndexInfo in org.apache.drill.exec.planner.index
Methods in org.apache.drill.exec.planner.index that return FunctionalIndexInfoModifier and TypeMethodDescriptionDrillIndexDescriptor.getFunctionalInfo()IndexDescriptor.getFunctionalInfo()Get the functional index information associated with this index (Functional indexes are indexes involving expressions e.g CAST(a as INT).Methods in org.apache.drill.exec.planner.index with parameters of type FunctionalIndexInfoModifier and TypeMethodDescriptionstatic org.apache.calcite.rel.RelCollationIndexPlanUtils.buildCollationLowerProject(List<org.apache.calcite.rex.RexNode> projectRexs, org.apache.calcite.rel.RelNode input, FunctionalIndexInfo indexInfo) Build collation property for the 'lower' project, the one closer to the Scanstatic 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 org.apache.calcite.rel.RelCollationIndexPlanUtils.buildCollationUpperProject(List<org.apache.calcite.rex.RexNode> projectRexs, org.apache.calcite.rel.RelCollation inputCollation, FunctionalIndexInfo indexInfo, Map<Integer, List<org.apache.calcite.rex.RexNode>> collationFilterMap) Build collation property for the 'upper' project, the one above the filterstatic org.apache.calcite.rex.RexNodeFunctionalIndexHelper.convertConditionForIndexScan(org.apache.calcite.rex.RexNode idxCondition, org.apache.calcite.rel.RelNode origScan, org.apache.calcite.rel.type.RelDataType idxRowType, org.apache.calcite.rex.RexBuilder builder, FunctionalIndexInfo functionInfo) static org.apache.calcite.rel.type.RelDataTypeFunctionalIndexHelper.convertRowTypeForIndexScan(DrillScanRelBase origScan, IndexableExprMarker idxMarker, IndexGroupScan idxScan, FunctionalIndexInfo functionInfo) For IndexScan in non-covering case, rowType to return contains only row_key('_id') of primary table.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 List<SchemaPath> IndexPlanUtils.rewriteFunctionColumn(List<SchemaPath> paths, FunctionalIndexInfo functionInfo, List<SchemaPath> addedPaths) For IndexGroupScan, if a column is only appeared in the should-be-renamed function, this column is to-be-replaced column, we replace that column(schemaPath) from 'a.b' to '$1' in the list of SchemaPath. -
Uses of FunctionalIndexInfo in org.apache.drill.exec.planner.index.generators
Fields in org.apache.drill.exec.planner.index.generators declared as FunctionalIndexInfoModifier and TypeFieldDescriptionprotected final FunctionalIndexInfoCoveringIndexPlanGenerator.functionInfoprotected final FunctionalIndexInfoCoveringPlanNoFilterGenerator.functionInfoprotected final FunctionalIndexInfoNonCoveringIndexPlanGenerator.functionInfoConstructors in org.apache.drill.exec.planner.index.generators with parameters of type FunctionalIndexInfoModifierConstructorDescriptionCoveringIndexPlanGenerator(IndexLogicalPlanCallContext indexContext, FunctionalIndexInfo functionInfo, IndexGroupScan indexGroupScan, 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)