public abstract class PushFilterIntoSourceScanRuleBase
extends org.apache.calcite.plan.RelOptRule
Constructor and Description |
---|
PushFilterIntoSourceScanRuleBase(org.apache.calcite.plan.RelOptRuleOperand operand,
String description) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canPushdownFilter(org.apache.flink.table.planner.plan.schema.TableSourceTable tableSourceTable)
Determines wether we can pushdown the filter into the source.
|
protected List<org.apache.calcite.rex.RexNode> |
convertExpressionToRexNode(List<ResolvedExpression> expressions,
org.apache.calcite.tools.RelBuilder relBuilder) |
protected org.apache.calcite.rex.RexNode |
createRemainingCondition(org.apache.calcite.tools.RelBuilder relBuilder,
List<ResolvedExpression> expressions,
org.apache.calcite.rex.RexNode[] unconvertedPredicates) |
protected scala.Tuple2<org.apache.calcite.rex.RexNode[],org.apache.calcite.rex.RexNode[]> |
extractPredicates(String[] inputNames,
org.apache.calcite.rex.RexNode filterExpression,
org.apache.calcite.rel.core.TableScan scan,
org.apache.calcite.rex.RexBuilder rexBuilder) |
protected String[] |
getNewExtraDigests(List<ResolvedExpression> acceptedFilters) |
protected org.apache.flink.table.planner.plan.stats.FlinkStatistic |
getNewFlinkStatistic(org.apache.flink.table.planner.plan.schema.TableSourceTable tableSourceTable,
int originPredicatesSize,
int updatedPredicatesSize) |
boolean |
matches(org.apache.calcite.plan.RelOptRuleCall call) |
protected scala.Tuple2<SupportsFilterPushDown.Result,org.apache.flink.table.planner.plan.schema.TableSourceTable> |
resolveFiltersAndCreateTableSourceTable(org.apache.calcite.rex.RexNode[] convertiblePredicates,
org.apache.flink.table.planner.plan.schema.TableSourceTable oldTableSourceTable,
org.apache.calcite.rel.core.TableScan scan,
org.apache.calcite.tools.RelBuilder relBuilder)
Resolves filters using the underlying sources
SupportsFilterPushDown and creates a
new TableSourceTable with the supplied predicates. |
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, none, onMatch, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
public PushFilterIntoSourceScanRuleBase(org.apache.calcite.plan.RelOptRuleOperand operand, String description)
public boolean matches(org.apache.calcite.plan.RelOptRuleCall call)
matches
in class org.apache.calcite.plan.RelOptRule
protected List<org.apache.calcite.rex.RexNode> convertExpressionToRexNode(List<ResolvedExpression> expressions, org.apache.calcite.tools.RelBuilder relBuilder)
protected org.apache.calcite.rex.RexNode createRemainingCondition(org.apache.calcite.tools.RelBuilder relBuilder, List<ResolvedExpression> expressions, org.apache.calcite.rex.RexNode[] unconvertedPredicates)
protected scala.Tuple2<SupportsFilterPushDown.Result,org.apache.flink.table.planner.plan.schema.TableSourceTable> resolveFiltersAndCreateTableSourceTable(org.apache.calcite.rex.RexNode[] convertiblePredicates, org.apache.flink.table.planner.plan.schema.TableSourceTable oldTableSourceTable, org.apache.calcite.rel.core.TableScan scan, org.apache.calcite.tools.RelBuilder relBuilder)
SupportsFilterPushDown
and creates a
new TableSourceTable
with the supplied predicates.convertiblePredicates
- Predicates to resolveoldTableSourceTable
- TableSourceTable to copyscan
- Underlying table scan to push torelBuilder
- Builder to push the scan toTableSourceTable
protected scala.Tuple2<org.apache.calcite.rex.RexNode[],org.apache.calcite.rex.RexNode[]> extractPredicates(String[] inputNames, org.apache.calcite.rex.RexNode filterExpression, org.apache.calcite.rel.core.TableScan scan, org.apache.calcite.rex.RexBuilder rexBuilder)
protected boolean canPushdownFilter(org.apache.flink.table.planner.plan.schema.TableSourceTable tableSourceTable)
tableSourceTable
- Table scan to attempt to push intoprotected org.apache.flink.table.planner.plan.stats.FlinkStatistic getNewFlinkStatistic(org.apache.flink.table.planner.plan.schema.TableSourceTable tableSourceTable, int originPredicatesSize, int updatedPredicatesSize)
protected String[] getNewExtraDigests(List<ResolvedExpression> acceptedFilters)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.