Search in sources :

Example 1 with GeneratedCollectorWrapper

use of org.apache.flink.table.runtime.generated.GeneratedCollectorWrapper in project flink by apache.

the class LookupJoinHarnessTest method createHarness.

// ---------------------------------------------------------------------------------
@SuppressWarnings("unchecked")
private OneInputStreamOperatorTestHarness<RowData, RowData> createHarness(JoinType joinType, FilterOnTable filterOnTable) throws Exception {
    boolean isLeftJoin = joinType == JoinType.LEFT_JOIN;
    ProcessFunction<RowData, RowData> joinRunner;
    if (filterOnTable == FilterOnTable.WITHOUT_FILTER) {
        joinRunner = new LookupJoinRunner(new GeneratedFunctionWrapper<>(new TestingFetcherFunction()), new GeneratedCollectorWrapper<>(new TestingFetcherCollector()), isLeftJoin, 2);
    } else {
        joinRunner = new LookupJoinWithCalcRunner(new GeneratedFunctionWrapper<>(new TestingFetcherFunction()), new GeneratedFunctionWrapper<>(new CalculateOnTemporalTable()), new GeneratedCollectorWrapper<>(new TestingFetcherCollector()), isLeftJoin, 2);
    }
    ProcessOperator<RowData, RowData> operator = new ProcessOperator<>(joinRunner);
    return new OneInputStreamOperatorTestHarness<>(operator, inSerializer);
}
Also used : ProcessOperator(org.apache.flink.streaming.api.operators.ProcessOperator) GeneratedFunctionWrapper(org.apache.flink.table.runtime.generated.GeneratedFunctionWrapper) GeneratedCollectorWrapper(org.apache.flink.table.runtime.generated.GeneratedCollectorWrapper) LookupJoinRunner(org.apache.flink.table.runtime.operators.join.lookup.LookupJoinRunner) OneInputStreamOperatorTestHarness(org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness) GenericRowData(org.apache.flink.table.data.GenericRowData) RowData(org.apache.flink.table.data.RowData) JoinedRowData(org.apache.flink.table.data.utils.JoinedRowData) LookupJoinWithCalcRunner(org.apache.flink.table.runtime.operators.join.lookup.LookupJoinWithCalcRunner)

Aggregations

ProcessOperator (org.apache.flink.streaming.api.operators.ProcessOperator)1 OneInputStreamOperatorTestHarness (org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness)1 GenericRowData (org.apache.flink.table.data.GenericRowData)1 RowData (org.apache.flink.table.data.RowData)1 JoinedRowData (org.apache.flink.table.data.utils.JoinedRowData)1 GeneratedCollectorWrapper (org.apache.flink.table.runtime.generated.GeneratedCollectorWrapper)1 GeneratedFunctionWrapper (org.apache.flink.table.runtime.generated.GeneratedFunctionWrapper)1 LookupJoinRunner (org.apache.flink.table.runtime.operators.join.lookup.LookupJoinRunner)1 LookupJoinWithCalcRunner (org.apache.flink.table.runtime.operators.join.lookup.LookupJoinWithCalcRunner)1