Search in sources :

Example 1 with KeyDiscarder

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

the class PythonPlanBinder method createHashPartitionOperation.

@SuppressWarnings("unchecked")
private void createHashPartitionOperation(PythonOperationInfo info) throws IOException {
    DataSet op1 = (DataSet) sets.get(info.parentID);
    sets.put(info.setID, op1.partitionByHash(info.keys).setParallelism(getParallelism(info)).map(new KeyDiscarder()).setParallelism(getParallelism(info)).name("HashPartitionPostStep"));
}
Also used : NestedKeyDiscarder(org.apache.flink.python.api.functions.util.NestedKeyDiscarder) KeyDiscarder(org.apache.flink.python.api.functions.util.KeyDiscarder) DataSet(org.apache.flink.api.java.DataSet)

Example 2 with KeyDiscarder

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

the class PythonPlanBinder method createDistinctOperation.

@SuppressWarnings("unchecked")
private void createDistinctOperation(PythonOperationInfo info) throws IOException {
    DataSet op = (DataSet) sets.get(info.parentID);
    sets.put(info.setID, op.distinct(info.keys).setParallelism(getParallelism(info)).name("Distinct").map(new KeyDiscarder()).setParallelism(getParallelism(info)).name("DistinctPostStep"));
}
Also used : NestedKeyDiscarder(org.apache.flink.python.api.functions.util.NestedKeyDiscarder) KeyDiscarder(org.apache.flink.python.api.functions.util.KeyDiscarder) DataSet(org.apache.flink.api.java.DataSet)

Aggregations

DataSet (org.apache.flink.api.java.DataSet)2 KeyDiscarder (org.apache.flink.python.api.functions.util.KeyDiscarder)2 NestedKeyDiscarder (org.apache.flink.python.api.functions.util.NestedKeyDiscarder)2