Package org.apache.flink.table.functions
Class VectorSearchFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.TableFunction<RowData>
-
- org.apache.flink.table.functions.VectorSearchFunction
-
- All Implemented Interfaces:
Serializable,FunctionDefinition
@PublicEvolving public abstract class VectorSearchFunction extends TableFunction<RowData>
A wrapper class ofTableFunctionfor synchronous vector search.The output type of this table function is fixed as
RowData.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VectorSearchFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voideval(Object... args)InvokevectorSearch(int, org.apache.flink.table.data.RowData)and handle exceptions.abstract Collection<RowData>vectorSearch(int topK, RowData queryData)Synchronously search result based on input row to find topK matched rows.-
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
-
vectorSearch
public abstract Collection<RowData> vectorSearch(int topK, RowData queryData) throws IOException
Synchronously search result based on input row to find topK matched rows.- Parameters:
topK- - The number of topK results to return.queryData- - ARowDatathat wraps input for vector search function.- Returns:
- A collection of predicted results.
- Throws:
IOException
-
eval
public final void eval(Object... args)
InvokevectorSearch(int, org.apache.flink.table.data.RowData)and handle exceptions.
-
-