danny0405 commented on a change in pull request #10400: 
[FLINK-13195][sql-client] Add create table support for SqlClient
URL: https://github.com/apache/flink/pull/10400#discussion_r353585320
 
 

 ##########
 File path: 
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/cli/SqlCommandParserTest.java
 ##########
 @@ -76,6 +76,10 @@ public void testCommands() {
                testInvalidSqlCommand("source"); // missing path
                testValidSqlCommand("USE CATALOG default", new 
SqlCommandCall(SqlCommand.USE_CATALOG, new String[]{"default"}));
                testValidSqlCommand("use default", new 
SqlCommandCall(SqlCommand.USE, new String[] {"default"}));
+               testValidSqlCommand("create Table hello(a int)", new 
SqlCommandCall(SqlCommand.CREATE_TABLE, new String[]{"create Table hello(a 
int)"}));
+               testValidSqlCommand("  CREATE TABLE hello(a int)", new 
SqlCommandCall(SqlCommand.CREATE_TABLE, new String[]{"CREATE TABLE hello(a 
int)"}));
+               testInvalidSqlCommand("CREATE tables");
 
 Review comment:
   Add tests for statements:
   
   1. `create table t(a int, b timestamp(6)) with ('k1' = 'v1', 'k2' = 'v2')`
   2. `create table t(a int, b timestamp(6), c as a + 1) with ('k1' = 'v1', 
'k2' = 'v2')`
   3. `create table t(a int, b timestamp(3), watermark for b as my_udf(b, 1) - 
INTERVAL '5' second) with ('k1' = 'v1', 'k2' = 'v2')`

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


With regards,
Apache Git Services

Reply via email to