Search in sources :

Example 1 with SimpleTupleJoinFunction

use of org.apache.flink.runtime.operators.testutils.SimpleTupleJoinFunction in project flink by apache.

the class AbstractSortMergeOuterJoinIteratorITCase method computeOuterJoin.

@SuppressWarnings("unchecked, rawtypes")
private List<Tuple4<String, String, String, Object>> computeOuterJoin(ResettableMutableObjectIterator<Tuple2<String, String>> input1, ResettableMutableObjectIterator<Tuple2<String, Integer>> input2, OuterJoinType outerJoinType) throws Exception {
    input1.reset();
    input2.reset();
    AbstractMergeOuterJoinIterator iterator = createOuterJoinIterator(outerJoinType, input1, input2, serializer1, comparator1, serializer2, comparator2, pairComp, this.memoryManager, this.ioManager, PAGES_FOR_BNLJN, this.parentTask);
    List<Tuple4<String, String, String, Object>> actual = new ArrayList<>();
    ListCollector<Tuple4<String, String, String, Object>> collector = new ListCollector<>(actual);
    while (iterator.callWithNextKey(new SimpleTupleJoinFunction(), collector)) ;
    iterator.close();
    return actual;
}
Also used : Tuple4(org.apache.flink.api.java.tuple.Tuple4) SimpleTupleJoinFunction(org.apache.flink.runtime.operators.testutils.SimpleTupleJoinFunction) ListCollector(org.apache.flink.api.common.functions.util.ListCollector) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 ListCollector (org.apache.flink.api.common.functions.util.ListCollector)1 Tuple4 (org.apache.flink.api.java.tuple.Tuple4)1 SimpleTupleJoinFunction (org.apache.flink.runtime.operators.testutils.SimpleTupleJoinFunction)1