Package org.apache.flink.table.functions
Class AsyncPredictFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.AsyncTableFunction<RowData>
-
- org.apache.flink.table.functions.AsyncPredictFunction
-
- All Implemented Interfaces:
Serializable,FunctionDefinition
@PublicEvolving public abstract class AsyncPredictFunction extends AsyncTableFunction<RowData>
A wrapper class ofAsyncTableFunctionfor asynchronous model inference.The output type of this table function is fixed as
RowData.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AsyncPredictFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CompletableFuture<Collection<RowData>>asyncPredict(RowData inputRow)Asynchronously predict result based on input row.voideval(CompletableFuture<Collection<RowData>> future, Object... args)InvokesasyncPredict(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
-
asyncPredict
public abstract CompletableFuture<Collection<RowData>> asyncPredict(RowData inputRow)
Asynchronously predict result based on input row.- Parameters:
inputRow- - ARowDatathat wraps input for predict function.- Returns:
- A collection of all predicted results.
-
eval
public void eval(CompletableFuture<Collection<RowData>> future, Object... args)
InvokesasyncPredict(org.apache.flink.table.data.RowData)and chains futures.
-
-