@SuppressWarnings({"rawtypes", "unchecked"}) @Before public void setup() { joiner = new MockRichFlatJoinFunction(); baseOperator = new OuterJoinOperatorBase(joiner, new BinaryOperatorInformation(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO), new int[0], new int[0], "TestJoiner", null); executionConfig = new ExecutionConfig(); String taskName = "Test rich outer join function"; TaskInfo taskInfo = new TaskInfo(taskName, 1, 0, 1, 0); HashMap<String, Accumulator<?, ?>> accumulatorMap = new HashMap<>(); HashMap<String, Future<Path>> cpTasks = new HashMap<>(); runtimeContext = new RuntimeUDFContext(taskInfo, null, executionConfig, cpTasks, accumulatorMap, new UnregisteredMetricsGroup()); }
@SuppressWarnings("unchecked") public JoinOperatorBase<?, ?, OUT, ?> build() { JoinOperatorBase<?, ?, OUT, ?> operator; if (joinType.isOuter()) { operator = new OuterJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name, getOuterJoinType()); } else { operator = new InnerJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name); } operator.setFirstInput(input1); operator.setSecondInput(input2); operator.setParallelism(parallelism); operator.setCustomPartitioner(partitioner); operator.setJoinHint(joinHint); return operator; }
@SuppressWarnings("unchecked") public JoinOperatorBase<?, ?, OUT, ?> build() { JoinOperatorBase<?, ?, OUT, ?> operator; if (joinType.isOuter()) { operator = new OuterJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name, getOuterJoinType()); } else { operator = new InnerJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name); } operator.setFirstInput(input1); operator.setSecondInput(input2); operator.setParallelism(parallelism); operator.setCustomPartitioner(partitioner); operator.setJoinHint(joinHint); return operator; }
@SuppressWarnings("unchecked") public JoinOperatorBase<?, ?, OUT, ?> build() { JoinOperatorBase<?, ?, OUT, ?> operator; if (joinType.isOuter()) { operator = new OuterJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name, getOuterJoinType()); } else { operator = new InnerJoinOperatorBase<>( udf, new BinaryOperatorInformation(input1Type, input2Type, resultType), this.keys1.computeLogicalKeyPositions(), this.keys2.computeLogicalKeyPositions(), this.name); } operator.setFirstInput(input1); operator.setSecondInput(input2); operator.setParallelism(parallelism); operator.setCustomPartitioner(partitioner); operator.setJoinHint(joinHint); return operator; }