lirui-apache commented on a change in pull request #12029:
URL: https://github.com/apache/flink/pull/12029#discussion_r426135660



##########
File path: 
flink-table/flink-sql-parser-hive/src/test/java/org/apache/flink/sql/parser/hive/FlinkHiveSqlParserImplTest.java
##########
@@ -221,4 +221,49 @@ public void testInsert() {
                                                "(SELECT *\n" +
                                                "FROM `SRC`)");
        }
+
+       @Test
+       public void testCreateView() {
+               sql("create view db1.v1 as select x,y from tbl")
+                               .ok("CREATE VIEW `DB1`.`V1`\n" +
+                                               "AS\n" +
+                                               "SELECT `X`, `Y`\n" +
+                                               "FROM `TBL`");
+               sql("create view if not exists v1 (c1,c2) as select * from tbl")
+                               .ok("CREATE VIEW IF NOT EXISTS `V1` (`C1`, 
`C2`)\n" +
+                                               "AS\n" +
+                                               "SELECT *\n" +
+                                               "FROM `TBL`");
+               sql("create view v1 comment 'v1 comment' 
tblproperties('k1'='v1','k2'='v2') as select * from tbl")
+                               .ok("CREATE VIEW `V1`\n" +
+                                               "COMMENT 'v1 comment'\n" +
+                                               "TBLPROPERTIES (\n" +
+                                               "  'k1' = 'v1',\n" +
+                                               "  'k2' = 'v2'\n" +
+                                               ")\n" +
+                                               "AS\n" +
+                                               "SELECT *\n" +
+                                               "FROM `TBL`");
+               // TODO: support column comments

Review comment:
       I'm afraid not. Actually table's column comment is not supported 
neither. The comments get discarded when converted to `TableSchema`.




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