JoinOperatorBaseBuilder<OUT> builder = new JoinOperatorBaseBuilder<OUT>(name, joinType) .withParallelism(getParallelism()) .withPartitioner(getPartitioner()) .withJoinHint(getJoinHint()) .withResultType(getResultType()); .withUdf(new TupleUnwrappingJoiner<>(function)) .withWrappedInput1(input1, selectorKeys1) .withWrappedInput2(input2, selectorKeys2); } else if (keys2 instanceof SelectorFunctionKeys) { .withUdf(new TupleRightUnwrappingJoiner<>(function)) .withInput1(input1, getInput1Type(), keys1) .withWrappedInput2(input2, selectorKeys2); } else { .withUdf(new TupleLeftUnwrappingJoiner<>(function)) .withWrappedInput1(input1, selectorKeys1) .withInput2(input2, getInput2Type(), keys2); .withUdf(function) .withInput1(input1, getInput1Type(), keys1) .withInput2(input2, getInput2Type(), keys2); } else { throw new UnsupportedOperationException("Unrecognized or incompatible key types."); return builder.build();
JoinOperatorBaseBuilder<OUT> builder = new JoinOperatorBaseBuilder<OUT>(name, joinType) .withParallelism(getParallelism()) .withPartitioner(getPartitioner()) .withJoinHint(getJoinHint()) .withResultType(getResultType()); .withUdf(new TupleUnwrappingJoiner<>(function)) .withWrappedInput1(input1, selectorKeys1) .withWrappedInput2(input2, selectorKeys2); } else if (keys2 instanceof SelectorFunctionKeys) { .withUdf(new TupleRightUnwrappingJoiner<>(function)) .withInput1(input1, getInput1Type(), keys1) .withWrappedInput2(input2, selectorKeys2); } else { .withUdf(new TupleLeftUnwrappingJoiner<>(function)) .withWrappedInput1(input1, selectorKeys1) .withInput2(input2, getInput2Type(), keys2); .withUdf(function) .withInput1(input1, getInput1Type(), keys1) .withInput2(input2, getInput2Type(), keys2); } else { throw new UnsupportedOperationException("Unrecognized or incompatible key types."); return builder.build();
JoinOperatorBaseBuilder<OUT> builder = new JoinOperatorBaseBuilder<OUT>(name, joinType) .withParallelism(getParallelism()) .withPartitioner(getPartitioner()) .withJoinHint(getJoinHint()) .withResultType(getResultType()); .withUdf(new TupleUnwrappingJoiner<>(function)) .withWrappedInput1(input1, selectorKeys1) .withWrappedInput2(input2, selectorKeys2); } else if (keys2 instanceof SelectorFunctionKeys) { .withUdf(new TupleRightUnwrappingJoiner<>(function)) .withInput1(input1, getInput1Type(), keys1) .withWrappedInput2(input2, selectorKeys2); } else { .withUdf(new TupleLeftUnwrappingJoiner<>(function)) .withWrappedInput1(input1, selectorKeys1) .withInput2(input2, getInput2Type(), keys2); .withUdf(function) .withInput1(input1, getInput1Type(), keys1) .withInput2(input2, getInput2Type(), keys2); } else { throw new UnsupportedOperationException("Unrecognized or incompatible key types."); return builder.build();
@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; }
public <I2, K> JoinOperatorBaseBuilder<OUT> withWrappedInput2( Operator<I2> input2, SelectorFunctionKeys<I2, ?> rawKeys2) { @SuppressWarnings("unchecked") SelectorFunctionKeys<I2, K> keys2 = (SelectorFunctionKeys<I2, K>) rawKeys2; TypeInformation<Tuple2<K, I2>> typeInfoWithKey2 = KeyFunctions.createTypeWithKey(keys2); Operator<Tuple2<K, I2>> keyMapper2 = KeyFunctions.appendKeyExtractor(input2, keys2); return withInput2(keyMapper2, typeInfoWithKey2, rawKeys2); }
public <I1, K> JoinOperatorBaseBuilder<OUT> withWrappedInput1( Operator<I1> input1, SelectorFunctionKeys<I1, ?> rawKeys1) { @SuppressWarnings("unchecked") SelectorFunctionKeys<I1, K> keys1 = (SelectorFunctionKeys<I1, K>) rawKeys1; TypeInformation<Tuple2<K, I1>> typeInfoWithKey1 = KeyFunctions.createTypeWithKey(keys1); Operator<Tuple2<K, I1>> keyMapper1 = KeyFunctions.appendKeyExtractor(input1, keys1); return this.withInput1(keyMapper1, typeInfoWithKey1, rawKeys1); }
public <I1, K> JoinOperatorBaseBuilder<OUT> withWrappedInput1( Operator<I1> input1, SelectorFunctionKeys<I1, ?> rawKeys1) { @SuppressWarnings("unchecked") SelectorFunctionKeys<I1, K> keys1 = (SelectorFunctionKeys<I1, K>) rawKeys1; TypeInformation<Tuple2<K, I1>> typeInfoWithKey1 = KeyFunctions.createTypeWithKey(keys1); Operator<Tuple2<K, I1>> keyMapper1 = KeyFunctions.appendKeyExtractor(input1, keys1); return this.withInput1(keyMapper1, typeInfoWithKey1, rawKeys1); }
public <I2, K> JoinOperatorBaseBuilder<OUT> withWrappedInput2( Operator<I2> input2, SelectorFunctionKeys<I2, ?> rawKeys2) { @SuppressWarnings("unchecked") SelectorFunctionKeys<I2, K> keys2 = (SelectorFunctionKeys<I2, K>) rawKeys2; TypeInformation<Tuple2<K, I2>> typeInfoWithKey2 = KeyFunctions.createTypeWithKey(keys2); Operator<Tuple2<K, I2>> keyMapper2 = KeyFunctions.appendKeyExtractor(input2, keys2); return withInput2(keyMapper2, typeInfoWithKey2, rawKeys2); }
@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; }
public <I2, K> JoinOperatorBaseBuilder<OUT> withWrappedInput2( Operator<I2> input2, SelectorFunctionKeys<I2, ?> rawKeys2) { @SuppressWarnings("unchecked") SelectorFunctionKeys<I2, K> keys2 = (SelectorFunctionKeys<I2, K>) rawKeys2; TypeInformation<Tuple2<K, I2>> typeInfoWithKey2 = KeyFunctions.createTypeWithKey(keys2); Operator<Tuple2<K, I2>> keyMapper2 = KeyFunctions.appendKeyExtractor(input2, keys2); return withInput2(keyMapper2, typeInfoWithKey2, rawKeys2); }
public <I1, K> JoinOperatorBaseBuilder<OUT> withWrappedInput1( Operator<I1> input1, SelectorFunctionKeys<I1, ?> rawKeys1) { @SuppressWarnings("unchecked") SelectorFunctionKeys<I1, K> keys1 = (SelectorFunctionKeys<I1, K>) rawKeys1; TypeInformation<Tuple2<K, I1>> typeInfoWithKey1 = KeyFunctions.createTypeWithKey(keys1); Operator<Tuple2<K, I1>> keyMapper1 = KeyFunctions.appendKeyExtractor(input1, keys1); return this.withInput1(keyMapper1, typeInfoWithKey1, rawKeys1); }