DynamicLookupExprFunction

class DynamicLookupExprFunction : ExprFunction

Performs dynamic variable resolution. Query authors should never call this function directly (and indeed it is named to avoid collision with the names of custom functions)--instead, the query planner injects call sites to this function to perform dynamic variable resolution of undefined variables. This provides a migration path for legacy customers that depend on this behavior.

Arguments:

  1. variable name (must be a symbol)

  2. case sensitivity (must be a symbol; one of: case_insensitive or case_sensitive)

  3. lookup strategy (must be a symbol; one of: globals_then_locals or locals_then_globals)

  4. A variadic list of values to be searched. Only struct are searched. This is required because it is not currently possible to know the types of these arguments within the variable resolution pass (org.partiql.lang.planner.transforms.LogicalToLogicalResolvedVisitorTransform). Therefore all variables in the current scope must be included in the list of values to be searched. TODO: when the open type system's static type inferencer is working, static type information can be used to identify and remove non-struct types from call sites to this function.

Constructors

Link copied to clipboard
fun DynamicLookupExprFunction()

Functions

Link copied to clipboard
open fun callWithOptional(session: EvaluationSession, required: List<ExprValue>, opt: ExprValue): ExprValue
Link copied to clipboard
open override fun callWithRequired(session: EvaluationSession, required: List<ExprValue>): ExprValue

Invokes the function with its required parameters only.

Link copied to clipboard
open fun callWithVariadic(session: EvaluationSession, required: List<ExprValue>, variadic: List<ExprValue>): ExprValue

Properties

Link copied to clipboard
open override val signature: FunctionSignature

Static signature of this function.