Class PushLimitIntoLegacyTableSourceScanRule
java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelRule<PushLimitIntoLegacyTableSourceScanRule.PushLimitIntoLegacyTableSourceScanRuleConfig>
org.apache.flink.table.planner.plan.rules.logical.PushLimitIntoLegacyTableSourceScanRule
@Internal
@Enclosing
public class PushLimitIntoLegacyTableSourceScanRule
extends org.apache.calcite.plan.RelRule<PushLimitIntoLegacyTableSourceScanRule.PushLimitIntoLegacyTableSourceScanRuleConfig>
Planner rule that tries to push limit into a
LimitableTableSource. The original limit
will still be retained.
The reasons why the limit still be retained: 1.If the source is required to return the exact number of limit number, the implementation of the source is highly required. The source is required to accurately control the record number of split, and the parallelism setting also need to be adjusted accordingly. 2.When remove the limit, maybe filter will be pushed down to the source after limit pushed down. The source need know it should do limit first and do the filter later, it is hard to implement. 3.We can support limit with offset, we can push down offset + fetch to table source.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConfiguration forPushLimitIntoLegacyTableSourceScanRule.Nested classes/interfaces inherited from class org.apache.calcite.plan.RelRule
org.apache.calcite.plan.RelRule.Config, org.apache.calcite.plan.RelRule.Done, org.apache.calcite.plan.RelRule.MatchHandler<R extends org.apache.calcite.plan.RelOptRule>, org.apache.calcite.plan.RelRule.OperandBuilder, org.apache.calcite.plan.RelRule.OperandDetailBuilder<R extends org.apache.calcite.rel.RelNode>, org.apache.calcite.plan.RelRule.OperandTransformNested classes/interfaces inherited from class org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelOptRule.ConverterRelOptRuleOperand -
Field Summary
FieldsFields inherited from class org.apache.calcite.plan.RelRule
configFields inherited from class org.apache.calcite.plan.RelOptRule
description, operands, relBuilderFactory -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPushLimitIntoLegacyTableSourceScanRule(PushLimitIntoLegacyTableSourceScanRule.PushLimitIntoLegacyTableSourceScanRuleConfig config) -
Method Summary
Methods inherited from class org.apache.calcite.plan.RelOptRule
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PushLimitIntoLegacyTableSourceScanRule
protected PushLimitIntoLegacyTableSourceScanRule(PushLimitIntoLegacyTableSourceScanRule.PushLimitIntoLegacyTableSourceScanRuleConfig config)
-
-
Method Details
-
matches
public boolean matches(org.apache.calcite.plan.RelOptRuleCall call) - Overrides:
matchesin classorg.apache.calcite.plan.RelOptRule
-
onMatch
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call) - Specified by:
onMatchin classorg.apache.calcite.plan.RelOptRule
-