Interface StrictScalarFunction

All Superinterfaces:
ScalarFunction

public non-sealed interface StrictScalarFunction extends ScalarFunction
A scalar function whose arguments are all evaluated before it is called — the ordinary kind.

The list handed over is a length the declared Arity allows, since the engine checks that first, and its entries are never null: an absent value is NullValue, and most implementations begin by returning NULL for a NULL input.

Throwing is how a function reports a value it cannot work with — a non-numeric string handed to Sqr. The engine turns the message into a query-level diagnostic, so it should read as a statement about the data rather than about Java.

  • Method Details

    • invoke

      Value invoke(FunctionContext context, List<Value> arguments)
      Computes the result for one row.
      Parameters:
      context - the ambient state this call may read
      arguments - the evaluated arguments, in call order; never null and of a length the declared arity accepts
      Returns:
      the result value; never null