Search in sources :

Example 1 with BatchPhysicalCalc

use of org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc in project flink by apache.

the class PushLocalHashAggWithCalcIntoScanRule method matches.

@Override
public boolean matches(RelOptRuleCall call) {
    BatchPhysicalLocalHashAggregate localHashAgg = call.rel(1);
    BatchPhysicalCalc calc = call.rel(2);
    BatchPhysicalTableSourceScan tableSourceScan = call.rel(3);
    return isInputRefOnly(calc) && isProjectionNotPushedDown(tableSourceScan) && canPushDown(call, localHashAgg, tableSourceScan);
}
Also used : BatchPhysicalLocalHashAggregate(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalHashAggregate) BatchPhysicalCalc(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc) BatchPhysicalTableSourceScan(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalTableSourceScan)

Example 2 with BatchPhysicalCalc

use of org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc in project flink by apache.

the class PushLocalHashAggWithCalcIntoScanRule method onMatch.

@Override
public void onMatch(RelOptRuleCall call) {
    BatchPhysicalLocalHashAggregate localHashAgg = call.rel(1);
    BatchPhysicalCalc calc = call.rel(2);
    BatchPhysicalTableSourceScan oldScan = call.rel(3);
    int[] calcRefFields = getRefFiledIndex(calc);
    pushLocalAggregateIntoScan(call, localHashAgg, oldScan, calcRefFields);
}
Also used : BatchPhysicalLocalHashAggregate(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalHashAggregate) BatchPhysicalCalc(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc) BatchPhysicalTableSourceScan(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalTableSourceScan)

Example 3 with BatchPhysicalCalc

use of org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc in project flink by apache.

the class PushLocalSortAggWithCalcIntoScanRule method matches.

@Override
public boolean matches(RelOptRuleCall call) {
    BatchPhysicalLocalSortAggregate localAggregate = call.rel(1);
    BatchPhysicalCalc calc = call.rel(2);
    BatchPhysicalTableSourceScan tableSourceScan = call.rel(3);
    return isInputRefOnly(calc) && isProjectionNotPushedDown(tableSourceScan) && canPushDown(call, localAggregate, tableSourceScan);
}
Also used : BatchPhysicalLocalSortAggregate(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalSortAggregate) BatchPhysicalCalc(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc) BatchPhysicalTableSourceScan(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalTableSourceScan)

Example 4 with BatchPhysicalCalc

use of org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc in project flink by apache.

the class PushLocalSortAggWithCalcIntoScanRule method onMatch.

@Override
public void onMatch(RelOptRuleCall call) {
    BatchPhysicalLocalSortAggregate localHashAgg = call.rel(1);
    BatchPhysicalCalc calc = call.rel(2);
    BatchPhysicalTableSourceScan oldScan = call.rel(3);
    int[] calcRefFields = getRefFiledIndex(calc);
    pushLocalAggregateIntoScan(call, localHashAgg, oldScan, calcRefFields);
}
Also used : BatchPhysicalLocalSortAggregate(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalSortAggregate) BatchPhysicalCalc(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc) BatchPhysicalTableSourceScan(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalTableSourceScan)

Example 5 with BatchPhysicalCalc

use of org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc in project flink by apache.

the class PushLocalSortAggWithSortAndCalcIntoScanRule method onMatch.

@Override
public void onMatch(RelOptRuleCall call) {
    BatchPhysicalGroupAggregateBase localSortAgg = call.rel(1);
    BatchPhysicalCalc calc = call.rel(3);
    BatchPhysicalTableSourceScan oldScan = call.rel(4);
    int[] calcRefFields = getRefFiledIndex(calc);
    pushLocalAggregateIntoScan(call, localSortAgg, oldScan, calcRefFields);
}
Also used : BatchPhysicalGroupAggregateBase(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalGroupAggregateBase) BatchPhysicalCalc(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc) BatchPhysicalTableSourceScan(org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalTableSourceScan)

Aggregations

BatchPhysicalCalc (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc)6 BatchPhysicalTableSourceScan (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalTableSourceScan)6 BatchPhysicalGroupAggregateBase (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalGroupAggregateBase)2 BatchPhysicalLocalHashAggregate (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalHashAggregate)2 BatchPhysicalLocalSortAggregate (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalSortAggregate)2