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
A wrapper class of
AsyncTableFunction for asynchronously lookup rows matching the lookup
keys from external system.
The output type of this table function is fixed as RowData.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract CompletableFuture<Collection<RowData>>asyncLookup(RowData keyRow) Asynchronously lookup rows matching the lookup keys.final voideval(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, getTypeInferenceMethods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.flink.table.functions.FunctionDefinition
getRequirements, isDeterministic, supportsConstantFolding
-
Constructor Details
-
AsyncLookupFunction
public AsyncLookupFunction()
-
-
Method Details
-
asyncLookup
Asynchronously lookup rows matching the lookup keys.Please note that the returning collection of RowData shouldn't be reused across invocations.
- Parameters:
keyRow- - ARowDatathat wraps lookup keys.- Returns:
- A collection of all matching rows in the lookup table.
-
eval
InvokesasyncLookup(org.apache.flink.table.data.RowData)and chains futures.
-