snuyanzin commented on code in PR #4899:
URL: https://github.com/apache/calcite/pull/4899#discussion_r3123580837


##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -7514,8 +7514,8 @@ SqlCall MatchRecognizeCallWithModifier() :
         <FINAL> { runningOp = SqlStdOperatorTable.FINAL; }
     )
     { s = span(); }
-    func = NamedFunctionCall() {
-        return runningOp.createCall(s.end(func), func);
+    e = Expression3(ExprContext.ACCEPT_NON_QUERY) {

Review Comment:
   Didn't get if your question is about `Expression3`  then 
https://github.com/snuyanzin/calcite/blob/dd71d5b3aa0bd004f4d5369986e50301b628b0ad/core/src/main/codegen/templates/Parser.jj#L4045-L4049
   
   if your question is about `MATCH_RECOGNIZE` then I have only links to other 
vendors
   like Snowflake 
https://docs.snowflake.com/en/sql-reference/constructs/match_recognize#syntax
   ```
       [ MEASURES <expr> [AS] <alias> [, ... ] ]
   ```
   and below they have explanation for `FINAL`, `RUNNING` (Snowlake doesn't 
allow `FINAL`, `RUNNING` for non function, however Calcite always sets either 
`FINAL` or `RUNNING` and unparses it like that)
   ```
   expr ::= ... [ { RUNNING | FINAL } ] windowFunction ...
   ```
   
   BigQuery seems doesn't have `FINAL`, `RUNNING` at all 
https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#match_recognize_clause
   
   Oracle doesn't use these keyword and determines `FINAL` or `RUNNING` 
implicitly  
https://docs.oracle.com/cd/E29542_01/apirefs.1111/e12048/pattern_recog.htm#BEJBFEGJ



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to