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<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. |
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, none, onMatch, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unorderedpublic 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.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.