Package com.pervasive.datarush.functions
Many operators on records can be expressed as functions. These take a record from the input, perform some computation on the records, and emit a new record on the output. This can further be broken down into a sequence of functions producing each output field. These take values from one or more (or even no) fields from the record, and compute a single value representing the field's value.
Because functions encompass a much smaller range of functionality than do operators, they can generally be implemented much more quickly and easily. Functions, like operators, are composable - multiple functions can be combined to build more complex processing. Additionally, multiple functions can be applied to a record, yielding multiple values which can be appended or overlaid on the original records.
Due to this composability, functions enjoy some performance advantages over operators as they can combine the effects of several simple operators into one, reducing the total overhead related to the execution of operators. It should be noted that not all operators can be expressed as functions; only operators which produce one record of output per each record of input can be expressed in this way.
- See Also:
-
ClassDescriptionProvides implementations of action functions.An ArgumentConverter is used by the
DefaultFunctionInvokerto convert ScalarValuedFunction arguments to the correct type.Provides implementations of common arithmetic functions.Provides implementations of common conditional evaluation functions.An abstract argument converter for converting String constants to the correct object type.
Child classes should implement the convert(String) object to produce an object.A reference to a known value.Provides implementations of common type conversion functions.Registers core classes containing ScalarValuedFunction methods.Provides implementations of common date/time functions.Definitions of date and time values that can be extracted from date and timestamp types.The desired granularity of the output.Converts an argument to a DateTimeValue enum value.The default argument converter.A default function invoker, which passes arguments directly to the method using anArgumentConverter.
Arguments may specify a converter using theFunctionArgumentannotation.An object describing the context in which a subexpression of a larger expression is being evaluated.A factory used to construct evaluators forScalarValuedFunctions.A reference to a field in a record schema.A typer for functions which return a fixed, known type.A specialized function invoker for format.Provides implementations of common formatting functions.Information about the context in which a function is evaluated.A description of a function, including its name, description, and argument names.An executor of a function.A FunctionInvoker is used by the FunctionRegistry to invoke a function method and by the AggregationInvoker to invoke an aggregation method.
The implementing class essentially translates an array of ScalarValuedFunction arguments into the proper format for a given function method.
A function method can specify its invoker using the Invoker annotation.A provider of registered classes for theFunctionRegistry.Stores a list of functions registered by the FunctionTypeResoultionProvider, and provides a method for calling those functions.Determines the upper bound and result type of aScalarValuedFunction.A collection of useful utilities for implementing classes related to functions.Provides implementations of Generator functions.Converts an argument to a Granularity enum value.A factory mapped by the widest type encompassing one or more input values.Exception thrown when an invalid argument is passed to a function within an expression.An exception indicating the data type of a subexpression is not valid for use in the containing expression.A function invoker which passes all of its arguments as a single list to the method.Provides implementations of common List functions.Provides implementations of common Map functions.A base class for factories which choose an evaluator based on a token type.Defines a mapping between data type and an evaluator class.Provides implementations of common math functions found in theMathlibrary.An executor of a function which is non-deterministic.Converts an argument to a NumberFormat object.A typer determining the output type of a function based on the types of one or more Object inputs.Provides implementations of common boolean and logical functions.A factory creating a fixed class of function evaluator.A factory mapped by the expected type of the result.Describes an implementation of a function.Specifies a bound on subexpressions used as arguments to a function.The description of a function taking record data and producing a scalar result.Convenient base class for implementations ofFunctionProvider.Provides implementations of common statistical functions.Provides implementations of common string functions.Specifies behavior of null values for string concatenation.Converts an argument to a TimeZone object.A specialized function invoker for wavg.A typer determining the output type of a function based on the types of one or more inputs.