Package org.apache.flink.table.functions
Class AsyncVectorSearchFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.AsyncTableFunction<RowData>
-
- org.apache.flink.table.functions.AsyncVectorSearchFunction
-
- All Implemented Interfaces:
Serializable,FunctionDefinition
@PublicEvolving public abstract class AsyncVectorSearchFunction extends AsyncTableFunction<RowData>
A wrapper class ofAsyncTableFunctionfor asynchronous vector search.The output type of this table function is fixed as
RowData.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AsyncVectorSearchFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CompletableFuture<Collection<RowData>>asyncVectorSearch(int topK, RowData queryData)Asynchronously search result based on input row to find topK matched rows.voideval(CompletableFuture<Collection<RowData>> future, Object... args)InvokesasyncVectorSearch(int, 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
-
asyncVectorSearch
public abstract CompletableFuture<Collection<RowData>> asyncVectorSearch(int topK, RowData queryData)
Asynchronously search result based on input row to find topK matched rows.- Parameters:
topK- - The number of topK matched rows to return.queryData- - ARowDatathat wraps input for search function.- Returns:
- A collection of all searched results.
-
eval
public void eval(CompletableFuture<Collection<RowData>> future, Object... args)
InvokesasyncVectorSearch(int, org.apache.flink.table.data.RowData)and chains futures.
-
-