Package org.apache.flink.table.functions
Class LookupFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.TableFunction<RowData>
-
- org.apache.flink.table.functions.LookupFunction
-
- All Implemented Interfaces:
Serializable
,FunctionDefinition
- Direct Known Subclasses:
CachingLookupFunction
,RetryableLookupFunctionDelegator
@PublicEvolving public abstract class LookupFunction extends TableFunction<RowData>
A wrapper class ofTableFunction
for synchronously lookup rows matching the lookup keys from external system.The output type of this table function is fixed as
RowData
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LookupFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
eval(Object... keys)
Invokelookup(org.apache.flink.table.data.RowData)
and handle exceptions.abstract Collection<RowData>
lookup(RowData keyRow)
Synchronously lookup rows matching the lookup keys.-
Methods inherited from class org.apache.flink.table.functions.TableFunction
collect, finish, getKind, getParameterTypes, getResultType, getTypeInference, setCollector
-
Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.functions.FunctionDefinition
getRequirements, isDeterministic, supportsConstantFolding
-
-
-
-
Method Detail
-
lookup
public abstract Collection<RowData> lookup(RowData keyRow) throws IOException
Synchronously lookup rows matching the lookup keys.Please note that the returning collection of RowData shouldn't be reused across invocations.
- Parameters:
keyRow
- - ARowData
that wraps lookup keys.- Returns:
- A collection of all matching rows in the lookup table.
- Throws:
IOException
-
eval
public final void eval(Object... keys)
Invokelookup(org.apache.flink.table.data.RowData)
and handle exceptions.
-
-