Search in sources :

Example 1 with PythonCoGroup

use of org.apache.flink.python.api.functions.PythonCoGroup in project flink by apache.

the class PythonPlanBinder method createCoGroupOperation.

@SuppressWarnings("unchecked")
private void createCoGroupOperation(PythonOperationInfo info) {
    DataSet op1 = (DataSet) sets.get(info.parentID);
    DataSet op2 = (DataSet) sets.get(info.otherID);
    Keys.ExpressionKeys<?> key1 = new Keys.ExpressionKeys(info.keys1, op1.getType());
    Keys.ExpressionKeys<?> key2 = new Keys.ExpressionKeys(info.keys2, op2.getType());
    PythonCoGroup pcg = new PythonCoGroup(info.setID, info.types);
    sets.put(info.setID, new CoGroupRawOperator(op1, op2, key1, key2, pcg, info.types, info.name).setParallelism(getParallelism(info)));
}
Also used : PythonCoGroup(org.apache.flink.python.api.functions.PythonCoGroup) CoGroupRawOperator(org.apache.flink.api.java.operators.CoGroupRawOperator) DataSet(org.apache.flink.api.java.DataSet) Keys(org.apache.flink.api.common.operators.Keys)

Aggregations

Keys (org.apache.flink.api.common.operators.Keys)1 DataSet (org.apache.flink.api.java.DataSet)1 CoGroupRawOperator (org.apache.flink.api.java.operators.CoGroupRawOperator)1 PythonCoGroup (org.apache.flink.python.api.functions.PythonCoGroup)1