Interface SimpleFunction

All Superinterfaces:
BoundFunction, Function, Serializable, UnboundFunction

@Evolving public interface SimpleFunction extends UnboundFunction, BoundFunction
A function that does not require binding to input types.

This interface is designed for functions that have no overloads and do not need custom binding logic. Implementations can directly provide function parameters and execution logic without implementing the bind method.

The default bind method simply returns this, as the function is already considered bound.

Since:
4.2.0
  • Method Details

    • bind

      default BoundFunction bind(StructType inputType)
      Description copied from interface: UnboundFunction
      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.

      Specified by:
      bind in interface UnboundFunction
      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