Interface FunctionDefinition

All Known Implementing Classes:
FunctionDefinitionDTO

@Evolving public interface FunctionDefinition
A function definition that pairs a specific parameter list with its implementations and return type. A single function can include multiple definitions (overloads), each with distinct parameters and implementations. Overload resolution is based on parameters only; return type or return columns are metadata and do not participate in definition matching.

For scalar or aggregate functions, use returnType() to specify the return type. For table-valued functions, use returnColumns() to specify the output columns.

  • Field Details

  • Method Details

    • parameters

      FunctionParam[] parameters()
      Returns:
      The parameters for this definition. Maybe an empty array for a no-arg definition.
    • returnType

      @Nullable default Type returnType()
      The return type for scalar or aggregate function definitions.
      Returns:
      The return type, or null if this is a table-valued function definition.
    • returnColumns

      default FunctionColumn[] returnColumns()
      The output columns for a table-valued function definition.

      A table-valued function is a function that returns a table instead of a scalar value or an aggregate result. The returned table has a fixed schema defined by the columns returned from this method.

      Returns:
      The output columns that define the schema of the table returned by this definition, or an empty array if this is a scalar or aggregate function definition.
    • impls

      FunctionImpl[] impls()
      Returns:
      The implementations associated with this definition.