imay commented on a change in pull request #2725: Add
timestampadd/timestampdiff function
URL: https://github.com/apache/incubator-doris/pull/2725#discussion_r365520117
##########
File path: fe/src/main/cup/sql_parser.cup
##########
@@ -3779,8 +3783,29 @@ timestamp_arithmetic_expr ::=
RESULT = new TimestampArithmeticExpr(functionName.getFunction(), l.get(0),
v, u);
:}
+ | function_name:functionName LPAREN unit:u COMMA expr:e1 COMMA expr:e2 RPAREN
+ {:
+ RESULT = new TimestampArithmeticExpr(functionName.getFunction(), e2, e1,
u);
+ :}
;
+unit ::=
+ KW_YEAR
Review comment:
should add this new keyword to keywords rule
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]