Class IntervalJoinFunction
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.RichFlatJoinFunction<RowData,RowData,RowData>
-
- org.apache.flink.table.runtime.operators.join.interval.IntervalJoinFunction
-
- All Implemented Interfaces:
Serializable
,FlatJoinFunction<RowData,RowData,RowData>
,Function
,RichFunction
,ResultTypeQueryable<RowData>
public class IntervalJoinFunction extends RichFlatJoinFunction<RowData,RowData,RowData> implements ResultTypeQueryable<RowData>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntervalJoinFunction(GeneratedJoinCondition joinCondition, InternalTypeInfo<RowData> returnTypeInfo, boolean[] filterNulls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation<RowData>
getProducedType()
Gets the data type (as aTypeInformation
) produced by this function or input format.void
join(RowData first, RowData second, Collector<RowData> out)
The join method, called once per joined pair of elements.void
open(OpenContext openContext)
Initialization method for the function.void
setJoinKey(RowData currentKey)
-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
-
-
-
Constructor Detail
-
IntervalJoinFunction
public IntervalJoinFunction(GeneratedJoinCondition joinCondition, InternalTypeInfo<RowData> returnTypeInfo, boolean[] filterNulls)
-
-
Method Detail
-
open
public void open(OpenContext openContext) throws Exception
Description copied from interface:RichFunction
Initialization method for the function. It is called before the actual working methods (like map or join) and thus suitable for one time setup work. For functions that are part of an iteration, this method will be invoked at the beginning of each iteration superstep.The openContext object passed to the function can be used for configuration and initialization. The openContext contains some necessary information that were configured on the function in the program composition.
public class MyFilter extends RichFilterFunction<String> { private String searchString; public void open(OpenContext openContext) { // initialize the value of searchString } public boolean filter(String value) { return value.equals(searchString); } }
- Specified by:
open
in interfaceRichFunction
- Overrides:
open
in classAbstractRichFunction
- Parameters:
openContext
- The context containing information about the context in which the function is opened.- Throws:
Exception
- Implementations may forward exceptions, which are caught by the runtime. When the runtime catches an exception, it aborts the task and lets the fail-over logic decide whether to retry the task execution.
-
join
public void join(RowData first, RowData second, Collector<RowData> out) throws Exception
Description copied from interface:FlatJoinFunction
The join method, called once per joined pair of elements.- Specified by:
join
in interfaceFlatJoinFunction<RowData,RowData,RowData>
- Specified by:
join
in classRichFlatJoinFunction<RowData,RowData,RowData>
- Parameters:
first
- The element from first input.second
- The element from second input.out
- The collector used to return zero, one, or more elements.- Throws:
Exception
- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
getProducedType
public TypeInformation<RowData> getProducedType()
Description copied from interface:ResultTypeQueryable
Gets the data type (as aTypeInformation
) produced by this function or input format.- Specified by:
getProducedType
in interfaceResultTypeQueryable<RowData>
- Returns:
- The data type produced by this function or input format.
-
setJoinKey
public void setJoinKey(RowData currentKey)
-
-