public class ExpressionJoinFunction<L,R,O> extends RichFlatJoinFunction<L,R,O>
join()
are forwarded to the compiled code.Constructor and Description |
---|
ExpressionJoinFunction(Expression predicate,
CompositeType<L> leftType,
CompositeType<R> rightType,
CompositeType<O> resultType,
scala.collection.Seq<Expression> outputFields,
TableConfig config) |
Modifier and Type | Method and Description |
---|---|
FlatJoinFunction<L,R,O> |
compiledJoin() |
void |
join(L left,
R right,
Collector<O> out)
The join method, called once per joined pair of elements.
|
void |
open(Configuration c)
Initialization method for the function.
|
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public ExpressionJoinFunction(Expression predicate, CompositeType<L> leftType, CompositeType<R> rightType, CompositeType<O> resultType, scala.collection.Seq<Expression> outputFields, TableConfig config)
public FlatJoinFunction<L,R,O> compiledJoin()
public void open(Configuration c)
RichFunction
The configuration object passed to the function can be used for configuration and initialization. The configuration contains all parameters that were configured on the function in the program composition.
public class MyMapper extends FilterFunction<String> {
private String searchString;
public void open(Configuration parameters) {
this.searchString = parameters.getString("foo");
}
public boolean filter(String value) {
return value.equals(searchString);
}
}
By default, this method does nothing.
open
in interface RichFunction
open
in class AbstractRichFunction
c
- The configuration containing the parameters attached to the contract.Configuration
public void join(L left, R right, Collector<O> out)
FlatJoinFunction
join
in interface FlatJoinFunction<L,R,O>
join
in class RichFlatJoinFunction<L,R,O>
left
- The element from first input.right
- The element from second input.out
- The collector used to return zero, one, or more elements.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.