Java Code Examples for org.apache.flink.api.java.typeutils.TypeExtractor#getFlatJoinReturnTypes()

The following examples show how to use org.apache.flink.api.java.typeutils.TypeExtractor#getFlatJoinReturnTypes() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Flink-CEPplus   File: JoinOperator.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Finalizes a Join transformation by applying a {@link org.apache.flink.api.common.functions.RichFlatJoinFunction} to each pair of joined elements.
 *
 * <p>Each JoinFunction call returns exactly one element.
 *
 * @param function The JoinFunction that is called for each pair of joined elements.
 * @return An EquiJoin that represents the joined result DataSet
 *
 * @see org.apache.flink.api.common.functions.RichFlatJoinFunction
 * @see org.apache.flink.api.java.operators.JoinOperator.EquiJoin
 * @see DataSet
 */
public <R> EquiJoin<I1, I2, R> with(FlatJoinFunction<I1, I2, R> function) {
	if (function == null) {
		throw new NullPointerException("Join function must not be null.");
	}
	TypeInformation<R> returnType = TypeExtractor.getFlatJoinReturnTypes(function, getInput1Type(), getInput2Type(), Utils.getCallLocationName(), true);
	return new EquiJoin<>(getInput1(), getInput2(), getKeys1(), getKeys2(), clean(function), returnType, getJoinHint(), Utils.getCallLocationName(), joinType);
}
 
Example 2
Source Project: flink   File: JoinOperator.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Finalizes a Join transformation by applying a {@link org.apache.flink.api.common.functions.RichFlatJoinFunction} to each pair of joined elements.
 *
 * <p>Each JoinFunction call returns exactly one element.
 *
 * @param function The JoinFunction that is called for each pair of joined elements.
 * @return An EquiJoin that represents the joined result DataSet
 *
 * @see org.apache.flink.api.common.functions.RichFlatJoinFunction
 * @see org.apache.flink.api.java.operators.JoinOperator.EquiJoin
 * @see DataSet
 */
public <R> EquiJoin<I1, I2, R> with(FlatJoinFunction<I1, I2, R> function) {
	if (function == null) {
		throw new NullPointerException("Join function must not be null.");
	}
	TypeInformation<R> returnType = TypeExtractor.getFlatJoinReturnTypes(function, getInput1Type(), getInput2Type(), Utils.getCallLocationName(), true);
	return new EquiJoin<>(getInput1(), getInput2(), getKeys1(), getKeys2(), clean(function), returnType, getJoinHint(), Utils.getCallLocationName(), joinType);
}
 
Example 3
Source Project: flink   File: JoinOperator.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Finalizes a Join transformation by applying a {@link org.apache.flink.api.common.functions.RichFlatJoinFunction} to each pair of joined elements.
 *
 * <p>Each JoinFunction call returns exactly one element.
 *
 * @param function The JoinFunction that is called for each pair of joined elements.
 * @return An EquiJoin that represents the joined result DataSet
 *
 * @see org.apache.flink.api.common.functions.RichFlatJoinFunction
 * @see org.apache.flink.api.java.operators.JoinOperator.EquiJoin
 * @see DataSet
 */
public <R> EquiJoin<I1, I2, R> with(FlatJoinFunction<I1, I2, R> function) {
	if (function == null) {
		throw new NullPointerException("Join function must not be null.");
	}
	TypeInformation<R> returnType = TypeExtractor.getFlatJoinReturnTypes(function, getInput1Type(), getInput2Type(), Utils.getCallLocationName(), true);
	return new EquiJoin<>(getInput1(), getInput2(), getKeys1(), getKeys2(), clean(function), returnType, getJoinHint(), Utils.getCallLocationName(), joinType);
}