Interface SimpleProcedure
- All Superinterfaces:
BoundProcedure,Procedure,UnboundProcedure
This interface is designed for procedures that have no overloads and do not need custom binding
logic. Implementations can directly provide procedure parameters and execution logic without
implementing the bind method.
The default bind method simply returns this, as the procedure
is already considered bound.
- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault BoundProcedurebind(StructType inputType) Binds this procedure to input types.Methods inherited from interface org.apache.spark.sql.connector.catalog.procedures.BoundProcedure
call, isDeterministic, parametersMethods inherited from interface org.apache.spark.sql.connector.catalog.procedures.Procedure
description, name
-
Method Details
-
bind
Description copied from interface:UnboundProcedureBinds this procedure to input types.If the catalog supports procedure overloading, the implementation is expected to pick the best matching version of the procedure. If overloading is not supported, the implementation can validate if the input types are compatible while binding or delegate that to Spark. Regardless, Spark will always perform the final validation of the arguments and rearrange them as needed based on
reported parameters.The provided
inputTypeis based on the procedure arguments. If an argument is passed by name, its metadata will indicate this withProcedureParameter.BY_NAME_METADATA_KEYset totrue. In such cases, the field name will match the name of the target procedure parameter. If the argument is not named,ProcedureParameter.BY_NAME_METADATA_KEYwill not be set and the name will be assigned randomly.- Specified by:
bindin interfaceUnboundProcedure- Parameters:
inputType- the input types to bind to- Returns:
- the bound procedure that is most suitable for the given input types
-