use of org.apache.flink.table.runtime.generated.GeneratedResultFutureWrapper in project flink by apache.
the class AsyncLookupJoinHarnessTest method createHarness.
// ---------------------------------------------------------------------------------
@SuppressWarnings({ "unchecked", "rawtypes" })
private OneInputStreamOperatorTestHarness<RowData, RowData> createHarness(JoinType joinType, FilterOnTable filterOnTable) throws Exception {
RichAsyncFunction<RowData, RowData> joinRunner;
boolean isLeftJoin = joinType == JoinType.LEFT_JOIN;
if (filterOnTable == FilterOnTable.WITHOUT_FILTER) {
joinRunner = new AsyncLookupJoinRunner(new GeneratedFunctionWrapper(new TestingFetcherFunction()), fetcherConverter, new GeneratedResultFutureWrapper<>(new TestingFetcherResultFuture()), rightRowSerializer, isLeftJoin, ASYNC_BUFFER_CAPACITY);
} else {
joinRunner = new AsyncLookupJoinWithCalcRunner(new GeneratedFunctionWrapper(new TestingFetcherFunction()), fetcherConverter, new GeneratedFunctionWrapper<>(new CalculateOnTemporalTable()), new GeneratedResultFutureWrapper<>(new TestingFetcherResultFuture()), rightRowSerializer, isLeftJoin, ASYNC_BUFFER_CAPACITY);
}
return new OneInputStreamOperatorTestHarness<>(new AsyncWaitOperatorFactory<>(joinRunner, ASYNC_TIMEOUT_MS, ASYNC_BUFFER_CAPACITY, AsyncDataStream.OutputMode.ORDERED), inSerializer);
}
Aggregations