Package dev.frostlake.executor
Class VisitorExpressionBuilder
java.lang.Object
dev.frostlake.executor.VisitorExpressionBuilder
Builds and evaluates SQL expressions on behalf of
SQLCommandVisitor: the procedural
expression AST (buildExpression), constant / DDL-time evaluation (evaluateExpression),
and the SYSTEM$ built-in family (evaluateSystemFunc). Extracted from the visitor;
identifier/text and literal helpers are reached through the visitor back-reference and
engine state through queryExecutor.-
Method Summary
Modifier and TypeMethodDescriptionBoolean tier (OR/AND/NOT) over the value/predicate `expression` below.Build an Expression from ANTLR expression contextSimplified expression evaluation for immediate values (like DEFAULT), in a Snowflake Scripting expression context — a bare name may be a scripting variable here (aLET/:=right-hand side, anIFcondition,RETURN <expr>, aDECLARE … DEFAULT).Evaluate an expression that sits in an embedded SQL statement rather than in a scripting expression (a CALL argument — Snowflake dispatches CALL as SQL — or a sessionSETvalue).
-
Method Details
-
buildExpression
Boolean tier (OR/AND/NOT) over the value/predicate `expression` below. -
buildExpression
Build an Expression from ANTLR expression context -
evaluateExpression
Simplified expression evaluation for immediate values (like DEFAULT), in a Snowflake Scripting expression context — a bare name may be a scripting variable here (aLET/:=right-hand side, anIFcondition,RETURN <expr>, aDECLARE … DEFAULT). -
evaluateSqlExpression
Evaluate an expression that sits in an embedded SQL statement rather than in a scripting expression (a CALL argument — Snowflake dispatches CALL as SQL — or a sessionSETvalue). A bare name is an identifier there, never a stored-procedure parameter /DECLAREd /LETvariable: Snowflake answersinvalid identifier '<NAME>'and requires the:namebind form. Session variables stay visible, as they are in Snowflake SQL.
-