Package org.apache.flink.table.functions
Class AsyncLookupFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.AsyncTableFunction<RowData>
-
- org.apache.flink.table.functions.AsyncLookupFunction
-
- All Implemented Interfaces:
Serializable
,FunctionDefinition
- Direct Known Subclasses:
CachingAsyncLookupFunction
,RetryableAsyncLookupFunctionDelegator
@PublicEvolving public abstract class AsyncLookupFunction extends AsyncTableFunction<RowData>
A wrapper class ofAsyncTableFunction
for asynchronously 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 AsyncLookupFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CompletableFuture<Collection<RowData>>
asyncLookup(RowData keyRow)
Asynchronously lookup rows matching the lookup keys.void
eval(CompletableFuture<Collection<RowData>> future, Object... keys)
InvokesasyncLookup(org.apache.flink.table.data.RowData)
and chains futures.-
Methods inherited from class org.apache.flink.table.functions.AsyncTableFunction
getKind, getTypeInference
-
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
-
asyncLookup
public abstract CompletableFuture<Collection<RowData>> asyncLookup(RowData keyRow)
Asynchronously 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.
-
eval
public final void eval(CompletableFuture<Collection<RowData>> future, Object... keys)
InvokesasyncLookup(org.apache.flink.table.data.RowData)
and chains futures.
-
-