Search in sources :

Example 6 with PythonMapPartition

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

the class PythonPlanBinder method createJoinOperation.

@SuppressWarnings("unchecked")
private void createJoinOperation(DatasizeHint mode, PythonOperationInfo info) {
    DataSet op1 = (DataSet) sets.get(info.parentID);
    DataSet op2 = (DataSet) sets.get(info.otherID);
    if (info.usesUDF) {
        sets.put(info.setID, createDefaultJoin(op1, op2, info.keys1, info.keys2, mode, getParallelism(info)).mapPartition(new PythonMapPartition(info.setID, info.types)).setParallelism(getParallelism(info)).name(info.name));
    } else {
        sets.put(info.setID, createDefaultJoin(op1, op2, info.keys1, info.keys2, mode, getParallelism(info)));
    }
}
Also used : DataSet(org.apache.flink.api.java.DataSet) PythonMapPartition(org.apache.flink.python.api.functions.PythonMapPartition)

Aggregations

DataSet (org.apache.flink.api.java.DataSet)6 PythonMapPartition (org.apache.flink.python.api.functions.PythonMapPartition)6 DefaultCross (org.apache.flink.api.java.operators.CrossOperator.DefaultCross)1