Search in sources :

Example 1 with BatchPhysicalLocalSortAggregate

use of org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalSortAggregate 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 2 with BatchPhysicalLocalSortAggregate

use of org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalSortAggregate 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 3 with BatchPhysicalLocalSortAggregate

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

the class PushLocalSortAggIntoScanRule method onMatch.

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

Example 4 with BatchPhysicalLocalSortAggregate

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

the class PushLocalSortAggIntoScanRule method matches.

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

Aggregations

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