java.lang.Object
com.pervasive.datarush.functions.EvaluationContext
An object describing the context in which a subexpression of a
larger expression is being evaluated. The context captures
global information pertaining to the top-level expression
containing the subexpression.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconstructEvaluator(EvaluatorFactory factory, List<Object> arguments, ScalarSettable result) Creates an evaluator for a top-level expression, binding its output to the provided result buffer.constructSubexpressionEvaluation(EvaluatorFactory factory, List<Object> arguments, ScalarTokenType resultType) Creates an evaluation of a subexpression which can be used as input to the evaluator of the expression containing it.Creates an evaluator for the top-level expression which memoizes subexpression values.getInput()Gets the input record used for the top-level expression.
-
Constructor Details
-
EvaluationContext
-
-
Method Details
-
getInput
Gets the input record used for the top-level expression.- Returns:
-
createMemoizingEvaluator
Creates an evaluator for the top-level expression which memoizes subexpression values.- Parameters:
f- the top-level evaluator- Returns:
- an evaluator caching intermediate results
-
constructEvaluator
public FunctionEvaluator constructEvaluator(EvaluatorFactory factory, List<Object> arguments, ScalarSettable result) Creates an evaluator for a top-level expression, binding its output to the provided result buffer.- Parameters:
factory- a factory for constructing the top-level functionarguments- the arguments to pass to the function evaluatorresult- the buffer into which evaluation results are to be written- Returns:
- a new evaluator
-
constructSubexpressionEvaluation
public ScalarValued constructSubexpressionEvaluation(EvaluatorFactory factory, List<Object> arguments, ScalarTokenType resultType) Creates an evaluation of a subexpression which can be used as input to the evaluator of the expression containing it.- Parameters:
factory- a factory for constructing the subexpression functionarguments- the arguments to pass to the function evaluator- Returns:
- an object containing the current value of the subexpression
-