CalvinKirs commented on code in PR #21916:
URL: https://github.com/apache/doris/pull/21916#discussion_r1277010605


##########
fe/fe-core/src/main/cup/sql_parser.cup:
##########
@@ -2609,7 +2630,72 @@ resource_desc ::=
         RESULT = new ResourceDesc(resourceName, properties);                   
      
     :}                                                                         
      
     ; 
-
+create_event_stmt ::=
+     KW_CREATE KW_EVENT job_label:jobLabel KW_ON KW_SCHEDULER KW_EVERY 
INTEGER_LITERAL:time_interval ident:time_unit opt_event_starts:startsTime 
opt_event_ends:endsTime opt_comment:comment KW_DO stmt:executeSql  
+    {:
+        CreateJobStmt stmt = new 
CreateJobStmt(jobLabel,null,time_interval,time_unit, startsTime, 
endsTime,comment,executeSql);
+        RESULT = stmt;
+    :}
+    | KW_CREATE KW_EVENT job_label:jobLabel KW_ON KW_SCHEDULER KW_AT 
STRING_LITERAL:atTime opt_comment:comment KW_DO stmt:executeSql  
+    {:
+        CreateJobStmt stmt = new 
CreateJobStmt(jobLabel,atTime,null,null,null,null,comment,executeSql);
+        RESULT = stmt;
+    :}
+    ;                           
+ opt_event_starts ::= 
+     {:
+         RESULT = null;
+     :}
+     | KW_STARTS STRING_LITERAL:startTime 
+     {: 
+        RESULT = startTime;    
+     :}
+     ;
+ 
+ opt_event_ends ::= 
+     {:
+         RESULT = null;
+     :}    
+     | KW_ENDS STRING_LITERAL:endTime 
+     {:  
+          RESULT = endTime;  
+     :}
+     ; 
+ event_do ::=
+     KW_DO STRING_LITERAL:sqlString
+     {:
+        RESULT = sqlString;
+     :}
+     ;         

Review Comment:
   good catch



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to