[ 
https://issues.apache.org/jira/browse/CALCITE-3985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved CALCITE-3985.
------------------------------------
    Fix Version/s: 1.24.0
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/2ba551905c4ae99be2c68e0c75301d9287d7b61a,
 thanks for the PR, [~amaliujia]!

> Simplify grouped window function in parser
> ------------------------------------------
>
>                 Key: CALCITE-3985
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3985
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>             Fix For: 1.24.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently in parser, there is [1]:
> {code:java}
> SqlCall GroupByWindowingCall():
> {
>     final Span s;
>     final List<SqlNode> args;
>     final SqlOperator op;
> }
> {
>     (
>         <TUMBLE>
>         {
>             s = span();
>             op = SqlStdOperatorTable.TUMBLE_OLD;
>         }
>     |
>         <HOP>
>         {
>             s = span();
>             op = SqlStdOperatorTable.HOP_OLD;
>         }
>     |
>         <SESSION>
>         {
>             s = span();
>             op = SqlStdOperatorTable.SESSION_OLD;
>         }
>     )
>     args = UnquantifiedFunctionParameterList(ExprContext.ACCEPT_SUB_QUERY) {
>         return op.createCall(s.end(this), args);
>     }
> }
> {code}
> The s=span() are duplicates and there could be a way to keep only one 
> s=span().
> [1]: 
> https://github.com/apache/calcite/blob/master/core/src/main/codegen/templates/Parser.jj#L6049



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to