public abstract class PushFilterIntoSourceScanRuleBase
extends org.apache.calcite.plan.RelOptRule
| 构造器和说明 |
|---|
PushFilterIntoSourceScanRuleBase(org.apache.calcite.plan.RelOptRuleOperand operand,
String description) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
canPushdownFilter(org.apache.flink.table.planner.plan.schema.TableSourceTable tableSourceTable)
Determines wether we can pushdown the filter into the source. we can not push filter twice,
make sure FilterPushDownSpec has not been assigned as a capability.
|
protected List<org.apache.calcite.rex.RexNode> |
convertExpressionToRexNode(List<org.apache.flink.table.expressions.ResolvedExpression> expressions,
org.apache.calcite.tools.RelBuilder relBuilder) |
protected org.apache.calcite.rex.RexNode |
createRemainingCondition(org.apache.calcite.tools.RelBuilder relBuilder,
List<org.apache.flink.table.expressions.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 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<org.apache.flink.table.connector.source.abilities.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. |
public PushFilterIntoSourceScanRuleBase(org.apache.calcite.plan.RelOptRuleOperand operand,
String description)
public boolean matches(org.apache.calcite.plan.RelOptRuleCall call)
matches 在类中 org.apache.calcite.plan.RelOptRuleprotected List<org.apache.calcite.rex.RexNode> convertExpressionToRexNode(List<org.apache.flink.table.expressions.ResolvedExpression> expressions, org.apache.calcite.tools.RelBuilder relBuilder)
protected org.apache.calcite.rex.RexNode createRemainingCondition(org.apache.calcite.tools.RelBuilder relBuilder,
List<org.apache.flink.table.expressions.ResolvedExpression> expressions,
org.apache.calcite.rex.RexNode[] unconvertedPredicates)
protected scala.Tuple2<org.apache.flink.table.connector.source.abilities.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 toTableSourceTableprotected 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)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.