Interface SimpleProcedure

All Superinterfaces:
BoundProcedure, Procedure, UnboundProcedure

@Evolving public interface SimpleProcedure extends UnboundProcedure, BoundProcedure
A procedure that does not require binding to input types.

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 Details

    • bind

      default BoundProcedure bind(StructType inputType)
      Description copied from interface: UnboundProcedure
      Binds 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 inputType is based on the procedure arguments. If an argument is passed by name, its metadata will indicate this with ProcedureParameter.BY_NAME_METADATA_KEY set to true. 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_KEY will not be set and the name will be assigned randomly.

      Specified by:
      bind in interface UnboundProcedure
      Parameters:
      inputType - the input types to bind to
      Returns:
      the bound procedure that is most suitable for the given input types