Search in sources :

Example 6 with BatchPhysicalTableSourceScan

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

the class PushLocalHashAggIntoScanRule method matches.

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

Example 7 with BatchPhysicalTableSourceScan

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

the class PushLocalHashAggIntoScanRule method onMatch.

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

Example 8 with BatchPhysicalTableSourceScan

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

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

Example 10 with BatchPhysicalTableSourceScan

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

BatchPhysicalTableSourceScan (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalTableSourceScan)14 BatchPhysicalCalc (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalCalc)7 BatchPhysicalGroupAggregateBase (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalGroupAggregateBase)5 BatchPhysicalLocalHashAggregate (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalHashAggregate)4 BatchPhysicalLocalSortAggregate (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalLocalSortAggregate)4 AggregateCall (org.apache.calcite.rel.core.AggregateCall)2 DynamicTableSource (org.apache.flink.table.connector.source.DynamicTableSource)2 AggregatePushDownSpec (org.apache.flink.table.planner.plan.abilities.source.AggregatePushDownSpec)2 SourceAbilitySpec (org.apache.flink.table.planner.plan.abilities.source.SourceAbilitySpec)2 BatchPhysicalExchange (org.apache.flink.table.planner.plan.nodes.physical.batch.BatchPhysicalExchange)2 TableSourceTable (org.apache.flink.table.planner.plan.schema.TableSourceTable)2 RowType (org.apache.flink.table.types.logical.RowType)2 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 RelOptRule (org.apache.calcite.plan.RelOptRule)1 RelOptRuleCall (org.apache.calcite.plan.RelOptRuleCall)1 RelOptRuleOperand (org.apache.calcite.plan.RelOptRuleOperand)1