Package org.partiql.lang.eval.physical

Types

Link copied to clipboard
class EvaluatorState(session: EvaluationSession, registers: Array<ExprValue>)

Contains state needed during query evaluation such as an instance of EvaluationSession and an array of registers for each local variable that is part of the query.

Link copied to clipboard
typealias SetVariableFunc = (EvaluatorState, ExprValue) -> Unit

Sets the value of a variable which is stored in an EvaluatorState.

To obtain an instance of SetVariableFunc that sets a specific variable, see toSetVariableFunc. This is because EvaluatorState.registers contains the current value of all variables in an SFW query. As such, allowing direct access to the registers is very risky--for example, if the wrong register is set the query will have the incorrect result or trigger an evaluation-time exception.

To mitigate this risk, EvaluatorState.registers is marked to internal to avoid exposing it publicly and SetVariableFunc is provided to allow custom operator implementation to assign values to only specific variables when needed.

Parameters:

  • EvaluatorState - The object containing the current state of the evaluator and current values of the variables.

  • ExprValue - The value to set.

Link copied to clipboard
class VariableBinding(setFunc: SetVariableFunc, expr: ValueExpression)

A compiled variable binding.