-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I'm not sure the SimpleSelectStatement.select and PrimaryExpression.FunctionCall rules are correct.
I'm assuming FunctionCall is intended to parse system function calls (E.g. ABS() or DATEADD(), etc)
Problems:
- It currently uses the
SelectElementsrule for its params property;
{infer FunctionCall} function=GlobalReference '(' params=SelectElements? ')'
overClause=OverClause?
SelectElements:
('ALL'|distinct?='DISTINCT')? elements+=SelectElement (',' elements+=SelectElement)*
;
SelectElement infers SelectElement:
{infer AllStar} '*'
| {infer AllTable} variableName=[TableVariableSource:Identifier] '.' '*'
| {infer ExpressionQuery} expr=Expression ('AS'? name=Identifier)?
;
- FunctionCall also directly defines the OVER statement, which should probably only be in SimpleSelectStatement in a window function expression
Happy to propose a fix if I've understood this correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels