Interface UnboundFunction

All Superinterfaces:
Function, Serializable

@Evolving public interface UnboundFunction extends Function
Represents a user-defined function that is not bound to input types.
Since:
3.2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(StructType inputType)
    Bind this function to an input type.
    Returns Function documentation.

    Methods inherited from interface org.apache.spark.sql.connector.catalog.functions.Function

    name
  • Method Details

    • bind

      BoundFunction bind(StructType inputType)
      Bind this function to an input type.

      If the input type is not supported, implementations must throw UnsupportedOperationException.

      For example, a "length" function that only supports a single string argument should throw UnsupportedOperationException if the struct has more than one field or if that field is not a string, and it may optionally throw if the field is nullable.

      Parameters:
      inputType - a struct type for inputs that will be passed to the bound function
      Returns:
      a function that can process rows with the given input type
      Throws:
      UnsupportedOperationException - If the function cannot be applied to the input type
    • description

      String description()
      Returns Function documentation.
      Returns:
      this function's documentation