Uses of Interface
dev.frostlake.executor.expressions.Expression
Packages that use Expression
Package
Description
-
Uses of Expression in dev.frostlake.executor
Methods in dev.frostlake.executor that return ExpressionModifier and TypeMethodDescriptionstatic ExpressionParse an expression string into anExpressionAST — the parse-once entry point for operators that previously re-evaluated the same text once per row.static ExpressionDeclarationTypes.sqlExpression(FrostlakeParser.ExpressionContext initialiser) The initialiser as a SQL expression, or null when it cannot be read as one.ExpressionEvaluator.withNarrowingCastEqualitiesAnswered(Expression predicate) A filter's predicate with the narrowing casts live answers without converting dropped: seeExpressionEvaluatorVisitor.withNarrowingCastEqualitiesAnswered(dev.frostlake.executor.expressions.Expression).Methods in dev.frostlake.executor with parameters of type ExpressionModifier and TypeMethodDescriptionExpressionEvaluator.argumentTypeText(Expression expression) How Snowflake NAMES an expression's type when it refuses it as an argument —VARCHAR(7)for a seven-character literal,VARCHAR(50)for a declared column,NUMBER(1,0),DATE.ExpressionEvaluator.collationOf(Expression expression) The collationexpressioncarries, lower-cased, or null for none — seeExpressionEvaluatorVisitor.collationOf(dev.frostlake.executor.expressions.Expression).booleanExpressionEvaluator.countsStoredColumn(Expression argument) Whether a COUNT overargumentis answered from the statistics: over a constant or a stored column (see ExpressionEvaluatorVisitor#countsStoredColumn).ExpressionEvaluator.evaluate(Expression expression, Row row) Evaluate an expression AST against a row (RECOMMENDED) This method is more efficient than string-based evaluation because the expression is already parsed.ExpressionEvaluator.inferStaticRange(Expression expression) The intervalexpression's values lie in, as the account's statistics would bound it, or null when none can be known.ExpressionEvaluator.inferStaticType(Expression expression) The typeexpressionis statically KNOWN to produce in this table context, or null when it cannot be determined.ExpressionEvaluator.keyCollation(Expression expression) The collation an ORDER BY, GROUP BY, DISTINCT, PARTITION BY or set-operation key compares under.static DataTypeDeclarationTypes.ofExpression(Expression expression, Map<String, DataType> typesInScope, QueryExecutor queryExecutor) ExpressionEvaluator.qualifiedAggregateText(Expression expression) ExpressionEvaluator.qualifiedText(dev.frostlake.executor.expressions.Expression)for an aggregate call that a NESTING message brackets: a plain AVG at that root prints as its SUM half, the way live names it — seeExpressionEvaluatorVisitor.strictAggregateText(dev.frostlake.executor.expressions.Expression).ExpressionEvaluator.qualifiedText(Expression expression) How Snowflake RE-PRINTS an expression when it names it in a refusal: from the analysed plan, so a bare column reference comes back qualified with the name its relation is known by in scope —noverFROM ebprintsEB.N, and overFROM eb xprintsX.N.voidExpressionEvaluator.rejectArgumentFamilies(Expression expression) Applies the argument-family refusals to every call inexpressionfrom declared types, before any row is read — seeExpressionEvaluatorVisitor.rejectArgumentFamilies(dev.frostlake.executor.expressions.Expression).booleanExpressionEvaluator.resolvesToAFunctionName(Expression expression) PHASE TWO as a QUESTION rather than a refusal.ExpressionEvaluator.spelledNumber(Expression expression) The NUMBERexpressionspells when it is a bare string literal, or a column carrying one out of a derived relation — what a projected column hands on so a conditional over it folds as live folds the literal (see TableColumn#getSpelledNumber); null for anything else.static DataTypeDeclarationTypes.staticType(Expression expression, Map<String, DataType> typesInScope, QueryExecutor queryExecutor) The static type an expression carries over the declared types in scope, as SQL types it — before any widening a declaration applies.ProceduralExecutor.typeOfSqlInitialiser(Expression sqlInitialiser) The type an untyped declaration takes from an initialiserProceduralExecutor.inferUntypedDeclarationType(dev.frostlake.executor.procedural.BaseExpression)does not type directly — seeDeclarationTypes— over the declared types in scope.voidExpressionEvaluator.validateBooleanPositions(Expression expression) The BOOLEAN positions insideexpression— a searched CASE's WHEN conditions, IFF's condition — judged at plan time on their static types, for a path that evaluates values before the strict walk would type them (the FROM-less select list).voidExpressionEvaluator.validateCollations(Expression expression) A JOIN condition's collation rules, judged before any row is read — seeExpressionEvaluatorVisitor.validateCollations(dev.frostlake.executor.expressions.Expression).voidExpressionEvaluator.validateColumnScope(Expression expression) PHASE ONE of the plan-time walk: every column reference, and nothing else.voidExpressionEvaluator.validateFunctionNames(Expression expression) PHASE TWO: every call's NAME, and nothing else.voidExpressionEvaluator.validateKey(Expression expression, SortKeyRole role) Key-position validation: Snowflake rejects a FILE-typed expression used as a GROUP BY, ORDER BY or window PARTITION BY key at compile time, while leaving it usable everywhere else (equality, DISTINCT, joins).voidExpressionEvaluator.validateOrderedValue(Expression expression) WITHIN GROUP (ORDER BY …) value validation: Snowflake rejects a semi-structured value in the position an ordering aggregate accumulates, with the same "incompatible types" sentenceMEDIANuses for its argument.voidExpressionEvaluator.validatePredicate(Expression expression) Predicate-position validation (Snowflake rejects VARCHAR/NUMBER-typed WHERE, HAVING and QUALIFY conditions at compile time) — run once per query on the parsed predicate before row evaluation.voidExpressionEvaluator.validateStrict(Expression expression) Plan-time strict-argument validation over a parsed expression: runs the Snowflake argument-type checks for every function call inexpressionWITHOUT evaluating it, so rejection fires even over zero input rows.voidExpressionEvaluator.validateStrictWindowed(Expression expression) ExpressionEvaluator.validateStrict(dev.frostlake.executor.expressions.Expression)for a WINDOW call re-formed without its OVER clause — the walk runs with the windowed marker set, so the bare-form desugared-name rewrites stay off (live reports the WRITTEN name for windowed forms, measured).voidExpressionEvaluator.validateUdfArguments(Expression expression) The plan-time user-defined function argument check alone, over a parsed expression.ExpressionEvaluator.withNarrowingCastEqualitiesAnswered(Expression predicate) A filter's predicate with the narrowing casts live answers without converting dropped: seeExpressionEvaluatorVisitor.withNarrowingCastEqualitiesAnswered(dev.frostlake.executor.expressions.Expression). -
Uses of Expression in dev.frostlake.executor.expressions
Classes in dev.frostlake.executor.expressions that implement ExpressionModifier and TypeClassDescriptionclassRepresents array element access (e.g., arr[0], data[index])classRepresents a BETWEEN expression (e.g., x BETWEEN 1 AND 10)classRepresents a binary operation (e.g., a + b, x > 5, name = 'Alice')classA:namebind-variable reference — inside a Snowflake Scripting block, SQL statements refer to the block's variables (and a procedure's parameters) as:name.classRepresents a CASE expressionclassRepresents a type cast (e.g., CAST(x AS INTEGER), x::VARCHAR).classRepresents a column reference (e.g., "name", "users.id", "u.name")classCONNECT_BY_ROOT <column>: the column's value on the ROOT row of the hierarchy branch that produced the current row.classThe bare wordDEFAULTwhere a DML value is expected —INSERT … VALUES (DEFAULT),UPDATE t SET c = DEFAULT, and the same two inside MERGE.classEXECUTE IMMEDIATE <sql-expr> [USING (v1, v2, …)]used as an expression: the SQL string (itself an expression — a literal, bind variable, concatenation, …) is evaluated, any USING values are bound to its?placeholders, the dynamic statement is executed, and its first column of the first row is returned (scalar), like a scalar subquery.classRepresents a function call (e.g., UPPER(name), COUNT(*), SUM(salary))classRepresents an IN expression (e.g., x IN (1, 2, 3) or x IN (SELECT ...))classRepresents an INTERVAL expression (e.g., INTERVAL '10' DAY)classRepresents anx IS NULL/x IS NOT NULLtest.classRepresents a JSON array literal (e.g., [1, 2, 3])classRepresents a JSON object literal (e.g., {'name': 'Alice', 'age': 30})classA lambda argument to a higher-order function —<param> -> <body>or(<param>, …) -> <body>(e.g.classSnowflake multi-pattern matching:x LIKE ANY (p1, p2, …),x LIKE ALL (…)andx ILIKE ANY (…), with an optional shared ESCAPE.classRepresents a literal value (string, number, boolean, null)classRepresents object property access (e.g., data:name, json:address:city).classPRIOR <column>inside aCONNECT BYpredicate: the column's value on the PARENT row of the hierarchy step being considered, as opposed to the candidate child row every other reference reads.classRepresents a quantified comparison expression (e.g., x > ANY (subquery))classclassThe spread operator**<expr>: inside an array constructor or a function argument list the inner ARRAY's elements are spliced in as individual elements/arguments; inside an object constructor the inner OBJECT's pairs are merged in.classRepresents a subquery expression (scalar subquery or EXISTS)classclassfinal classRow-constructorINtest:(a, b) IN (SELECT x, y ...),(a, b) IN ((1, 2), (3, 4)), or the type-invalid flat spelling(a, b) IN (1, 2).classRepresents a unary operation (e.g., NOT x, -5, EXISTS(...))classA window function call (one carrying anOVERclause) that appears nested inside a larger expression — e.g.Methods in dev.frostlake.executor.expressions that return ExpressionModifier and TypeMethodDescriptionExpressionAstBuilder.build(FrostlakeParser.BooleanExprContext ctx) Build anExpressionAST from a parsedbooleanExpr(top) context.ArrayAccessExpression.getArray()ObjectAccessExpression.getBase()LambdaExpression.getBody()WhenClause.getCondition()CaseExpression.getElseExpression()BinaryOperationExpression.getEscape()The LIKE/ILIKEESCAPEcharacter expression, or null if the query had no ESCAPE clause.LikeAnyAllExpression.getEscape()CastExpression.getExpression()ArrayAccessExpression.getIndex()SpreadExpression.getInner()BinaryOperationExpression.getLeft()QuantifiedComparisonExpression.getLeft()BetweenExpression.getLower()FunctionCallExpression.getNameExpression()IsNullExpression.getOperand()UnaryOperationExpression.getOperand()WhenClause.getResult()BinaryOperationExpression.getRight()ExecuteImmediateExpression.getSqlExpression()SystemStreamHasDataExpression.getStreamNameExpr()LikeAnyAllExpression.getSubject()QuantifiedComparisonExpression.getSubquery()SystemUserTaskCancelExpression.getTaskNameExpr()BetweenExpression.getUpper()BetweenExpression.getValue()InExpression.getValue()IntervalExpression.getValueExpression()FunctionCallExpression.getWithinGroupOrdered()The expression a trailing WITHIN GROUP orders by — seeFunctionCallExpression.describeWithinGroup(dev.frostlake.executor.expressions.Expression).WindowFunctionExpression.getWithinGroupOrdered()TheWITHIN GROUP (ORDER BY …)key, or null when the call carries no such clause.static ExpressionParses the expression string into anExpressionAST:AntlrExpressionParser.parseTree(String)for the grammar's parse tree, thenExpressionAstBuilderto turn it into AST nodes.ExpressionAstBuilder.visitAdditiveExpr(FrostlakeParser.AdditiveExprContext ctx) ExpressionAstBuilder.visitAndExpr(FrostlakeParser.AndExprContext ctx) ExpressionAstBuilder.visitAnsiSubstringExpr(FrostlakeParser.AnsiSubstringExprContext ctx) The ANSISUBSTRING(<x> FROM <a> FOR <b>)spelling, which Snowflake refuses for every function name there is — SUBSTRING included.ExpressionAstBuilder.visitArrayAccessExpr(FrostlakeParser.ArrayAccessExprContext ctx) ExpressionAstBuilder.visitBetweenExpr(FrostlakeParser.BetweenExprContext ctx) ExpressionAstBuilder.visitBindVarExpr(FrostlakeParser.BindVarExprContext ctx) ExpressionAstBuilder.visitCaseExpr(FrostlakeParser.CaseExprContext ctx) ExpressionAstBuilder.visitCastExpr(FrostlakeParser.CastExprContext ctx) ExpressionAstBuilder.visitCastExpr2(FrostlakeParser.CastExpr2Context ctx) ExpressionAstBuilder.visitChildren(org.antlr.v4.runtime.tree.RuleNode node) Backstop for anyexpressionalternative not explicitly handled above.ExpressionAstBuilder.visitCollateExpr(FrostlakeParser.CollateExprContext ctx) ExpressionAstBuilder.visitCollateFuncExpr(FrostlakeParser.CollateFuncExprContext ctx) ExpressionAstBuilder.visitComparisonExpr(FrostlakeParser.ComparisonExprContext ctx) ExpressionAstBuilder.visitConcatExpr(FrostlakeParser.ConcatExprContext ctx) ExpressionAstBuilder.visitConnectByRootExpr(FrostlakeParser.ConnectByRootExprContext ctx) CONNECT_BY_ROOT <column>— the hierarchy root row's value of that column.ExpressionAstBuilder.visitCurrentDateExpr(FrostlakeParser.CurrentDateExprContext ctx) ExpressionAstBuilder.visitCurrentTimeExpr(FrostlakeParser.CurrentTimeExprContext ctx) ExpressionAstBuilder.visitCurrentTimestampExpr(FrostlakeParser.CurrentTimestampExprContext ctx) ExpressionAstBuilder.visitCurrentUserExpr(FrostlakeParser.CurrentUserExprContext ctx) ExpressionAstBuilder.visitExistsExpr(FrostlakeParser.ExistsExprContext ctx) ExpressionAstBuilder.visitExtractFromExpr(FrostlakeParser.ExtractFromExprContext ctx) ExpressionAstBuilder.visitFieldAccessExpr(FrostlakeParser.FieldAccessExprContext ctx) ExpressionAstBuilder.visitFunctionCallExpr(FrostlakeParser.FunctionCallExprContext ctx) ExpressionAstBuilder.visitFunctionCallMixedArgsExpr(FrostlakeParser.FunctionCallMixedArgsExprContext ctx) ExpressionAstBuilder.visitFunctionCallNamedArgsExpr(FrostlakeParser.FunctionCallNamedArgsExprContext ctx) ExpressionAstBuilder.visitFunctionCallStarExpr(FrostlakeParser.FunctionCallStarExprContext ctx) ExpressionAstBuilder.visitInListExpr(FrostlakeParser.InListExprContext ctx) ExpressionAstBuilder.visitInSubqueryExpr(FrostlakeParser.InSubqueryExprContext ctx) ExpressionAstBuilder.visitIntervalExpr(FrostlakeParser.IntervalExprContext ctx) ExpressionAstBuilder.visitIntervalStringExpr(FrostlakeParser.IntervalStringExprContext ctx) ExpressionAstBuilder.visitIsDistinctExpr(FrostlakeParser.IsDistinctExprContext ctx) ExpressionAstBuilder.visitIsNullExpr(FrostlakeParser.IsNullExprContext ctx) ExpressionAstBuilder.visitJsonArrayExpr(FrostlakeParser.JsonArrayExprContext ctx) ExpressionAstBuilder.visitJsonObjectExpr(FrostlakeParser.JsonObjectExprContext ctx) ExpressionAstBuilder.visitLikeAnyAllExpr(FrostlakeParser.LikeAnyAllExprContext ctx) ExpressionAstBuilder.visitLikeExpr(FrostlakeParser.LikeExprContext ctx) ExpressionAstBuilder.visitLiteralExpr(FrostlakeParser.LiteralExprContext ctx) A literal, STAMPED with where it was written.ExpressionAstBuilder.visitMultiplicativeExpr(FrostlakeParser.MultiplicativeExprContext ctx) ExpressionAstBuilder.visitNotExpr(FrostlakeParser.NotExprContext ctx) ExpressionAstBuilder.visitObjectAccessExpr(FrostlakeParser.ObjectAccessExprContext ctx) ExpressionAstBuilder.visitOrExpr(FrostlakeParser.OrExprContext ctx) ExpressionAstBuilder.visitOuterJoinColumnExpr(FrostlakeParser.OuterJoinColumnExprContext ctx) column(+)— the Oracle legacy outer-join marker.ExpressionAstBuilder.visitParenExpr(FrostlakeParser.ParenExprContext ctx) ExpressionAstBuilder.visitPositionalBindExpr(FrostlakeParser.PositionalBindExprContext ctx) ExpressionAstBuilder.visitPositionInExpr(FrostlakeParser.PositionInExprContext ctx) ExpressionAstBuilder.visitPriorExpr(FrostlakeParser.PriorExprContext ctx) PRIOR <column>— the parent-row side of a CONNECT BY step.ExpressionAstBuilder.visitQualifiedNameExpr(FrostlakeParser.QualifiedNameExprContext ctx) ExpressionAstBuilder.visitQuantifiedComparisonExpr(FrostlakeParser.QuantifiedComparisonExprContext ctx) ExpressionAstBuilder.visitRlikeExpr(FrostlakeParser.RlikeExprContext ctx) ExpressionAstBuilder.visitScalarSubqueryExpr(FrostlakeParser.ScalarSubqueryExprContext ctx) ExpressionAstBuilder.visitSearchedCaseExpr(FrostlakeParser.SearchedCaseExprContext ctx) ExpressionAstBuilder.visitSessionVarExpr(FrostlakeParser.SessionVarExprContext ctx) ExpressionAstBuilder.visitSimpleCaseExpr(FrostlakeParser.SimpleCaseExprContext ctx) ExpressionAstBuilder.visitSystemFuncExpr(FrostlakeParser.SystemFuncExprContext ctx) ExpressionAstBuilder.visitSystemStreamHasDataExpr(FrostlakeParser.SystemStreamHasDataExprContext ctx) ExpressionAstBuilder.visitSystemUserTaskCancelExpr(FrostlakeParser.SystemUserTaskCancelExprContext ctx) ExpressionAstBuilder.visitTryCastExpr(FrostlakeParser.TryCastExprContext ctx) ExpressionAstBuilder.visitTupleInFlatListExpr(FrostlakeParser.TupleInFlatListExprContext ctx) ExpressionAstBuilder.visitTupleInListExpr(FrostlakeParser.TupleInListExprContext ctx) ExpressionAstBuilder.visitTupleInSubqueryExpr(FrostlakeParser.TupleInSubqueryExprContext ctx) ExpressionAstBuilder.visitTypedDateTimeLiteralExpr(FrostlakeParser.TypedDateTimeLiteralExprContext ctx) ExpressionAstBuilder.visitTypedLiteralArgExpr(FrostlakeParser.TypedLiteralArgExprContext ctx) An IDENTIFIER followed by a STRING inside a call, which live reads as a TYPED LITERAL and refuses by NAME rather than by syntax:TRIM(BOTH ' ')is "Unsupported data type literal 'BOTH ' ''" there, andUPPER(FOO ' ')is the same sentence with the same shape — so it is not a TRIM rule, it is the DATE '2020-01-01' form with an unknown word in front.ExpressionAstBuilder.visitUnaryExpr(FrostlakeParser.UnaryExprContext ctx) ExpressionAstBuilder.visitValueExpr(FrostlakeParser.ValueExprContext ctx) Boolean tier value alternative: drop straight through to the underlying value expression.ExpressionEvaluatorVisitor.withNarrowingCastEqualitiesAnswered(Expression predicate) A WHERE's or ON's predicate with live's one exemption from the width check applied.Methods in dev.frostlake.executor.expressions that return types with arguments of type ExpressionModifier and TypeMethodDescriptionFunctionCallExpression.getArguments()WindowFunctionExpression.getArguments()JsonArrayExpression.getElements()TupleInExpression.getFlatListValues()WindowFunctionExpression.getOrderKeys()WindowFunctionExpression.getPartitionKeys()The PARTITION BY keys, or null when the OVER clause was never described.LikeAnyAllExpression.getPatterns()JsonObjectExpression.getProperties()TupleInExpression.getTupleRows()ExecuteImmediateExpression.getUsingBindings()The USING bind expressions (bound positionally to?placeholders), or null/empty if none.InExpression.getValues()TupleInExpression.getValues()Methods in dev.frostlake.executor.expressions with parameters of type ExpressionModifier and TypeMethodDescriptionExpressionEvaluatorVisitor.argumentTypeText(Expression arg) The type name live prints when it refuses an argument, for callers outside the strict-argument walk — the table-function parameter checks name their offending argument the same way.ExpressionEvaluatorVisitor.collationOf(Expression expr) The collationexprcarries, and the level it holds it at (seeCollationLevel).booleanExpressionEvaluatorVisitor.countsStoredColumn(Expression argument) Whether a COUNT overargumentis answered from the statistics: over a constant, or over a column that is one of the catalog table's stored columns — a derived relation's too, where it passes one through unchanged.voidFunctionCallExpression.describeWithinGroup(Expression ordered) Record the expression a trailingWITHIN GROUP (ORDER BY …)orders by.voidWindowFunctionExpression.describeWithinGroup(Expression ordered) Record the call'sWITHIN GROUP (ORDER BY …)key, which is where an ORDERED aggregate's VALUES come from — for a percentile the arguments carry only the fraction, so a node without this has nothing to type from but the fraction, and typed the fraction.ExpressionEvaluatorVisitor.inferStaticRange(Expression expr) The intervalexpr's values lie in, or null when none can be known.ExpressionEvaluatorVisitor.inferStaticType(Expression expr) The statically-known type ofexprin this table context, or null when undetermined — the projection-time entry point that gives a derived relation's columns their declared types.static booleanImpliedTextNumber.isTextLiteral(Expression expr) Whether an expression is a text literal, whose reading keeps its own scale.static StringAstPrinterVisitor.print(Expression expression) Convenience: render an expression to its canonical string.voidExpressionEvaluatorVisitor.rejectArgumentFamilies(Expression expr) Applies every function's argument-family refusals to the calls inexprfrom their DECLARED types, before any row is read — the check the row loop makes for each call, brought forward so that an aggregate over an empty table is refused as live refuses it:SELECT AVG(bo) FROM t WHERE FALSEis "Invalid argument types for function 'SUM': (BOOLEAN)" at the call on the account, not NULL.ExpressionEvaluatorVisitor.spelledNumber(Expression expr) The NUMBERexprspells when it is a bare string literal, or a column that carries one out of a derived relation, else null — see TableColumn#getSpelledNumber.ExpressionEvaluatorVisitor.strictAggregateText(Expression expr) ExpressionEvaluatorVisitor.strictText(dev.frostlake.executor.expressions.Expression)for one of the two calls a NESTING message brackets: a plain AVG at that root is named by its SUM half rather than its whole definition — seeStrictMessagePrinter.averageSumHalf(dev.frostlake.executor.expressions.Expression).ExpressionEvaluatorVisitor.strictConversionText(Expression expr) ExpressionEvaluatorVisitor.strictText(dev.frostlake.executor.expressions.Expression)as an invalid-type sentence quotes an operand: its conversions spelled as the functions the plan made of them,TO_VECTOR(ARRAY_CONSTRUCT(1, 2, 3))andFIXED_TO_FIXED(1 AS NUMBER(10,2)[UNKNOWN])— seeStrictPrintMode.CONVERSION.ExpressionEvaluatorVisitor.strictPlanText(Expression expr) ExpressionEvaluatorVisitor.strictText(dev.frostlake.executor.expressions.Expression)in the plan-shaped mode — the aggregate, cast and scalar rewrites live's plan applies before it names an operand — for the sentences that re-print an operand from the plan, such as a conversion refusal's parameter.ExpressionEvaluatorVisitor.strictText(Expression expr) The expression as a strictness message renders it: live prints the call from its analysed plan, so a column reference comes out qualified with its source relation (TO_VARCHAR(FK.F),CAST(STT.SO AS …)) — seeStrictMessagePrinter.voidExpressionEvaluatorVisitor.validateBooleanPositions(Expression expr) The BOOLEAN positions inside a predicate — a searched CASE's WHEN conditions and theExpressionEvaluatorVisitor.BOOLEAN_STRICT_ARGScalls — judged at plan time, so thatWHERE CASE WHEN g THEN TRUE ENDover a VARCHAR refuses over an empty table exactly as it does in a SELECT list.voidExpressionEvaluatorVisitor.validateCollations(Expression expr) The collation rules alone, walked over a JOIN's ON condition before any pair of rows is read: AND, OR and NOT are descended, and every comparison, LIKE, IN list and BETWEEN beneath them settles its operands' collations — so two that disagree are refused over tables with no rows, as they are live, rather than surfacing only when a pair happens to be compared.voidExpressionEvaluatorVisitor.validateColumnScopeOnly(Expression expression) PHASE ONE of the plan-time walk: every column reference inexpression, nothing else.voidExpressionEvaluatorVisitor.validateFunctionNamesOnly(Expression expression) PHASE TWO: every call NAME inexpression, nothing else.voidExpressionEvaluatorVisitor.validateGeoComparisons(Expression expr) The GEOSPATIAL comparison rules alone, walked over a PREDICATE.voidExpressionEvaluatorVisitor.validateKeyExpression(Expression expr, SortKeyRole role) Plan-time rejection of a FILE or a GEOSPATIAL value in a GROUPING / SORTING key position.voidExpressionEvaluatorVisitor.validateOrderedValueExpression(Expression expr) The value an ordering aggregate accumulates may not be semi-structured.voidExpressionEvaluatorVisitor.validatePredicateType(Expression predicate) Predicate-position strictness: Snowflake rejects a WHERE, HAVING or QUALIFY condition whose static type is VARCHAR or NUMBER (live: "Invalid data type [VARCHAR(10)] for predicate [STRICT_T.S10]", "[NUMBER(38,0)] for predicate [T.N]", and "[VARCHAR(4)] for predicate ['true']" for a literal).voidExpressionEvaluatorVisitor.validateStrictArguments(Expression expr) voidExpressionEvaluatorVisitor.validateUdfArguments(Expression expr) The user-defined function argument check alone, for a FROM-less select item: that path computes the item's value without the strict walk, so the one plan-time refusal it must not miss is run here on its own, before the value is (seeExpressionEvaluatorVisitor.rejectUncoercibleUdfArguments(java.lang.String, dev.frostlake.executor.expressions.FunctionCallExpression)).ExpressionEvaluatorVisitor.withNarrowingCastEqualitiesAnswered(Expression predicate) A WHERE's or ON's predicate with live's one exemption from the width check applied.Method parameters in dev.frostlake.executor.expressions with type arguments of type ExpressionModifier and TypeMethodDescriptionvoidWindowFunctionExpression.describeCall(String name, List<Expression> callArgs) Record what the call IS, read off the parse tree when this node was built.voidWindowFunctionExpression.describeOver(boolean distinctCall, List<Expression> partition, List<Expression> order, List<Boolean> ascending, List<Boolean> nullsFirst) Describe the OVER clause itself, so a message can re-print the call the way live's plan spells it — every key qualified, every sort key with its direction and null placement, the frame and the null treatment dropped — rather than as the source text it was written in.static TupleInExpressionTupleInExpression.ofFlatList(List<Expression> values, List<Expression> flatListValues, boolean not) static TupleInExpressionTupleInExpression.ofSubquery(List<Expression> values, SubqueryExpression subquery, boolean not) static TupleInExpressionTupleInExpression.ofTupleRows(List<Expression> values, List<List<Expression>> tupleRows, boolean not) FunctionCallExpression.withArguments(List<Expression> spliced) This call with another argument list and everything else as written — a star spliced in place.Constructors in dev.frostlake.executor.expressions with parameters of type ExpressionModifierConstructorDescriptionArrayAccessExpression(Expression array, Expression index) BetweenExpression(Expression value, Expression lower, Expression upper, boolean not) BinaryOperationExpression(Expression left, BinaryOperator operator, Expression right) BinaryOperationExpression(Expression left, BinaryOperator operator, Expression right, Expression escape) CaseExpression(List<WhenClause> whenClauses, Expression elseExpression) CastExpression(Expression expression, String targetType) CastExpression(Expression expression, String targetType, boolean tryMode) CastExpression(Expression expression, String targetType, boolean tryMode, DataType declaredTarget, CastFieldsModifier fieldsModifier) ExecuteImmediateExpression(Expression sqlExpression, List<Expression> usingBindings) FunctionCallExpression(String displayName, Expression nameExpression, List<Expression> arguments) A dynamically named call — IDENTIFIER('fn')(args):displayNamekeeps the source text (for printing/HAVING matching);nameExpressionyields the actual function name.InExpression(Expression value, SubqueryExpression subquery, boolean not) InExpression(Expression value, List<Expression> values, boolean not) IntervalExpression(Expression valueExpression, IntervalUnit unit) IntervalExpression(Expression valueExpression, IntervalUnit unit, IntervalExpression rest) IsNullExpression(Expression operand, boolean not) LambdaExpression(List<String> parameters, List<String> parameterTypes, Expression body) LikeAnyAllExpression(Expression subject, List<Expression> patterns, boolean all, boolean caseInsensitive, Expression escape) ObjectAccessExpression(Expression base, List<String> pathParts) QuantifiedComparisonExpression(Expression left, BinaryOperator operator, Quantifier quantifier, Expression subquery) SpreadExpression(Expression inner) SystemStreamHasDataExpression(Expression streamNameExpr) SystemUserTaskCancelExpression(Expression taskNameExpr) UnaryOperationExpression(UnaryOperator operator, Expression operand) WhenClause(Expression condition, Expression result) WhenClause(Expression condition, Expression result, boolean operandMatch) A WHEN of either CASE form.Constructor parameters in dev.frostlake.executor.expressions with type arguments of type ExpressionModifierConstructorDescriptionExecuteImmediateExpression(Expression sqlExpression, List<Expression> usingBindings) FunctionCallExpression(String displayName, Expression nameExpression, List<Expression> arguments) A dynamically named call — IDENTIFIER('fn')(args):displayNamekeeps the source text (for printing/HAVING matching);nameExpressionyields the actual function name.FunctionCallExpression(String functionName, List<Expression> arguments) FunctionCallExpression(String functionName, List<Expression> arguments, boolean distinct, boolean star) FunctionCallExpression(String functionName, List<Expression> arguments, List<String> argumentNames) InExpression(Expression value, List<Expression> values, boolean not) JsonArrayExpression(List<Expression> elements) JsonObjectExpression(Map<String, Expression> properties) LikeAnyAllExpression(Expression subject, List<Expression> patterns, boolean all, boolean caseInsensitive, Expression escape) -
Uses of Expression in dev.frostlake.executor.operators
Methods in dev.frostlake.executor.operators with parameters of type ExpressionModifier and TypeMethodDescriptionbooleanHavingEvaluator.evaluate(Expression condition, Row aggregatedRow) booleanQualifyEvaluator.evaluate(Expression condition, Row row, int rowIndex) RowExpressionEvaluator.evaluate(Expression expression, Row row) Evaluate a parsed expression AST on a row.Constructors in dev.frostlake.executor.operators with parameters of type ExpressionModifierConstructorDescriptionAsofJoinOperator(Table leftTable, Table rightTable, List<Row> rightRows, BinaryOperator matchOperator, Expression leftMatchExpression, RowExpressionEvaluator leftMatchEvaluator, Expression rightMatchExpression, RowExpressionEvaluator rightMatchEvaluator, JoinConditionEvaluator partitionEvaluator) -
Uses of Expression in dev.frostlake.executor.procedural
Methods in dev.frostlake.executor.procedural that return ExpressionModifier and TypeMethodDescriptionSqlScalarExpression.getExpression()ReturnStatement.getSqlExpression()SetStatement.getSqlInitialiser()Methods in dev.frostlake.executor.procedural with parameters of type ExpressionModifier and TypeMethodDescriptionvoidReturnStatement.setSqlExpression(Expression sqlExpression) voidSetStatement.setSqlInitialiser(Expression sqlInitialiser) Constructors in dev.frostlake.executor.procedural with parameters of type Expression