Class SimpleFunction

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Abs, ArcCos, ArcSin, ArcTan, ArcTan2, Ceil, Coalesce, Concat, Cos, Extract, Floor, Greatest, If, IfNull, Least, NullIf, Pow, ReadPerfCounter, ResetPerfCounter, Round, Sin, Sqrt, Substring, Tan

public abstract class SimpleFunction extends ScalarFunction
This class provides the general abstraction for simple scalar functions, which take zero or more arguments, and produce a single scalar result based on these inputs. The function's results may be deterministic or non-deterministic.
To Do:
(donnie) Would be nice to provide an "is deterministic" flag on functions so that expressions including deterministic functions may be simplified.
  • Constructor Details

    • SimpleFunction

      public SimpleFunction()
  • Method Details

    • evaluate

      public abstract Object evaluate(Environment env, List<Expression> args)
      Evaluates the function. Should be called at runtime for every function call.
      Parameters:
      env - Environment, in which the arguments are evaluated
      args - Arguments for this function
      Returns:
      The value of the function
      Throws:
      ExpressionException - when there is a problem with the evaluation like wrong number of arguments.