All Superinterfaces:
Symbol
All Known Implementing Classes:
RelationFunctionSymbol, ScalarFunctionSymbol

public sealed interface FunctionSymbol extends Symbol permits ScalarFunctionSymbol, RelationFunctionSymbol
Sealed sub-interface of Symbol for all function-typed symbols.

A function symbol describes a callable entity: its parameter list, return type, optimizer hints, and (for user-defined functions) an optional body expression.

Function overloading is supported. Two FunctionSymbol instances with the same Symbol.namespace() and Symbol.canonicalName() are considered distinct overloads if and only if their parameterSignature() lists differ.

Two implementations exist: ScalarFunctionSymbol (scalar-valued) and RelationFunctionSymbol (relation-valued / table-valued).

  • Method Details

    • parameters

      List<ParameterDefinition> parameters()
      The ordered list of typed, named parameters.
      Returns:
      parameter definitions; never null, may be empty for zero-argument functions
    • returnType

      ScalarType returnType()
      The scalar type of the value this function returns.

      Meaningful only for a ScalarFunctionSymbol; a RelationFunctionSymbol returns a whole relation (see RelationFunctionSymbol.returnSchema()) and reports ScalarType.ANY here as a neutral placeholder.

      Returns:
      return type; never null
    • properties

      Set<FunctionProperty> properties()
      The set of optimizer hint flags declared for this function.
      Returns:
      an unmodifiable set of properties; never null, may be empty
    • parameterSignature

      default List<ScalarType> parameterSignature()
      The ordered list of parameter types, derived from parameters(). This list is the discriminator used for overload resolution.
      Returns:
      an ordered list of ScalarType values, one per parameter