amaliujia commented on a change in pull request #1761:
URL: https://github.com/apache/calcite/pull/1761#discussion_r415455884
##########
File path: core/src/main/codegen/templates/Parser.jj
##########
@@ -6065,10 +6065,22 @@ SqlCall GroupByWindowingCall():
final List<SqlNode> args;
}
{
- <TUMBLE> { s = span(); }
- args = UnquantifiedFunctionParameterList(ExprContext.ACCEPT_SUB_QUERY) {
- return SqlStdOperatorTable.TUMBLE.createCall(s.end(this), args);
- }
+ (
+ <TUMBLE> { s = span(); }
+ args = UnquantifiedFunctionParameterList(ExprContext.ACCEPT_SUB_QUERY)
{
+ return SqlStdOperatorTable.TUMBLE.createCall(s.end(this), args);
+ }
+ |
+ <HOP> { s = span(); }
+ args = UnquantifiedFunctionParameterList(ExprContext.ACCEPT_SUB_QUERY)
{
+ return SqlStdOperatorTable.HOP.createCall(s.end(this), args);
+ }
+ |
+ <SESSION> { s = span(); }
+ args = UnquantifiedFunctionParameterList(ExprContext.ACCEPT_SUB_QUERY)
{
+ return SqlStdOperatorTable.SESSION.createCall(s.end(this), args);
+ }
Review comment:
I tried to change to this way
```
(
<TUMBLE>
{
op = SqlStdOperatorTable.TUMBLE_OLD;
}
|
<HOP>
{
op = SqlStdOperatorTable.HOP_OLD;
}
|
<SESSION>
{
op = SqlStdOperatorTable.SESSION_OLD;
}
)
args = UnquantifiedFunctionParameterList(ExprContext.ACCEPT_SUB_QUERY) {
s = span();
return op.createCall(s.end(this), args);
}
```
But the parser didn't work as expected.
Any thing I have missed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]