Class PushLimitIntoTableSourceScanRule
- java.lang.Object
-
- org.apache.calcite.plan.RelOptRule
-
- org.apache.flink.table.planner.plan.rules.logical.PushLimitIntoTableSourceScanRule
-
public class PushLimitIntoTableSourceScanRule extends org.apache.calcite.plan.RelOptRule
Planner rule that tries to push limit into aFlinkLogicalTableSourceScan
, which table is aTableSourceTable
. And the table source in the table is aSupportsLimitPushDown
. 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.
-
-
Field Summary
Fields Modifier and Type Field Description static PushLimitIntoTableSourceScanRule
INSTANCE
-
Constructor Summary
Constructors Constructor Description PushLimitIntoTableSourceScanRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(org.apache.calcite.plan.RelOptRuleCall call)
void
onMatch(org.apache.calcite.plan.RelOptRuleCall call)
-
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 Detail
-
INSTANCE
public static final PushLimitIntoTableSourceScanRule INSTANCE
-
-