KurtYoung commented on a change in pull request #12029:
URL: https://github.com/apache/flink/pull/12029#discussion_r426108333



##########
File path: 
flink-table/flink-sql-parser-hive/src/main/codegen/includes/parserImpls.ftl
##########
@@ -958,3 +958,90 @@ void TableApiIdentifierSegment(List<String> names, 
List<SqlParserPos> positions)
         }
     }
 }
+
+/*  Parses a create view or replace existing view statement.
+ *  CREATE [OR REPLACE] VIEW view_name [ (field1, field2 ...) ] AS 
select_statement

Review comment:
       Provide an example in hive dialect

##########
File path: 
flink-table/flink-sql-parser-hive/src/main/codegen/includes/parserImpls.ftl
##########
@@ -958,3 +958,90 @@ void TableApiIdentifierSegment(List<String> names, 
List<SqlParserPos> positions)
         }
     }
 }
+
+/*  Parses a create view or replace existing view statement.
+ *  CREATE [OR REPLACE] VIEW view_name [ (field1, field2 ...) ] AS 
select_statement

Review comment:
       BTW, I think it's better to copy and paste some hive's DDL 
LanguageManual to each supported statement kind.

##########
File path: 
flink-table/flink-sql-parser-hive/src/main/java/org/apache/flink/sql/parser/hive/ddl/SqlCreateHiveView.java
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.sql.parser.hive.ddl;
+
+import org.apache.flink.sql.parser.ddl.SqlCreateView;
+import org.apache.flink.table.catalog.config.CatalogConfig;
+
+import org.apache.calcite.sql.SqlCharStringLiteral;
+import org.apache.calcite.sql.SqlIdentifier;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlNodeList;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.parser.SqlParserPos;
+
+/**
+ * CREATE View DDL for Hive dialect.

Review comment:
       put hive's Language Manual here, easier for us to check whether this 
class make sense.




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


Reply via email to