danny0405 commented on a change in pull request #8850: [FLINK-12954] Supports 
create(drop) view grammar for sql parser
URL: https://github.com/apache/flink/pull/8850#discussion_r298426924
 
 

 ##########
 File path: 
flink-table/flink-sql-parser/src/main/codegen/includes/parserImpls.ftl
 ##########
 @@ -334,6 +317,50 @@ void PartitionSpecCommaList(SqlNodeList list) :
     <RPAREN>
 }
 
+/**
+* Parses a create view or replace existing view statement.
+*   CREATE [OR REPLACE] VIEW view_name [ (field1, field2 ...) ] AS 
select_statement
+*/
+SqlCreate SqlCreateView(Span s, boolean replace) : {
+    boolean replaceView = false;
+    SqlIdentifier viewName;
+    SqlCharStringLiteral comment = null;
+    SqlNode query;
+    SqlNodeList fieldList = SqlNodeList.EMPTY;
+}
+{
+    [ <OR> <REPLACE> { replaceView = true; } ]
 
 Review comment:
   Yep, thanks.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to