Class FunctionCallExpression
java.lang.Object
dev.frostlake.executor.expressions.FunctionCallExpression
- All Implemented Interfaces:
Expression
Represents a function call (e.g., UPPER(name), COUNT(*), SUM(salary))
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionCallExpression(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) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ExpressionVisitor<T> visitor) Accept a visitor for the visitor patternvoiddescribeWithinGroup(Expression ordered) Record the expression a trailingWITHIN GROUP (ORDER BY …)orders by.The per-argument names (parallel togetArguments(); null entry = positional), or null if none are named.Canonical name parts (db, schema, fn), or null when the name has none — see the field note.Uppercase column names to omit when expanding a*argument (OBJECT_CONSTRUCT(* EXCLUDE …)).The expression a trailing WITHIN GROUP orders by — seedescribeWithinGroup(dev.frostlake.executor.expressions.Expression).booleanbooleanisStar()voidsetNameParts(List<String> nameParts) voidsetPosition(SourcePosition position) voidsetStarExcludes(List<String> starExcludes) voidsetStarIlike(String starIlike) voidsetStarQualifier(String starQualifier) toString()withArguments(List<Expression> spliced) This call with another argument list and everything else as written — a star spliced in place.
-
Constructor Details
-
FunctionCallExpression
-
FunctionCallExpression
public FunctionCallExpression(String functionName, List<Expression> arguments, boolean distinct, boolean star) -
FunctionCallExpression
public FunctionCallExpression(String functionName, List<Expression> arguments, List<String> argumentNames) -
FunctionCallExpression
public 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.
-
-
Method Details
-
withArguments
This call with another argument list and everything else as written — a star spliced in place. -
getFunctionName
-
describeWithinGroup
Record the expression a trailingWITHIN GROUP (ORDER BY …)orders by.Evaluation does not read it — the percentile accumulators take the ordered column from the parse tree themselves — but the STATIC channel cannot: PERCENTILE_CONT and PERCENTILE_DISC are typed from the column they order by rather than from the fraction they are handed, and without this the AST node held only the fraction. Read at build for the same reason
WindowFunctionExpression.describeWindow(boolean, boolean)reads the OVER clause's shape there: so nothing has to re-parse the call's text later.- Parameters:
ordered- the single ORDER BY expression, or null when there is not exactly one
-
getWithinGroupOrdered
The expression a trailing WITHIN GROUP orders by — seedescribeWithinGroup(dev.frostlake.executor.expressions.Expression). -
getArguments
-
getArgumentNames
The per-argument names (parallel togetArguments(); null entry = positional), or null if none are named. -
isDistinct
public boolean isDistinct() -
isStar
public boolean isStar() -
getStarExcludes
Uppercase column names to omit when expanding a*argument (OBJECT_CONSTRUCT(* EXCLUDE …)). -
getStarQualifier
-
setStarQualifier
-
getStarIlike
-
setStarIlike
-
setStarExcludes
-
getNameParts
Canonical name parts (db, schema, fn), or null when the name has none — see the field note. -
setNameParts
-
accept
Description copied from interface:ExpressionAccept a visitor for the visitor pattern- Specified by:
acceptin interfaceExpression
-
toString
-
getNameExpression
-
getPosition
-
setPosition
-