bowenli86 commented on a change in pull request #9118: [FLINK-13206][sql
client]replace `use database xxx` with `use xxx` in sql client parser
URL: https://github.com/apache/flink/pull/9118#discussion_r303537268
##########
File path:
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/cli/SqlCommandParserTest.java
##########
@@ -74,6 +74,8 @@ public void testCommands() {
testValidSqlCommand("reset;", new
SqlCommandCall(SqlCommand.RESET));
testValidSqlCommand("source /my/file", new
SqlCommandCall(SqlCommand.SOURCE, new String[] {"/my/file"}));
testInvalidSqlCommand("source"); // missing path
+ testValidSqlCommand("USE CATALOG default", new
SqlCommandCall(SqlCommand.USE_CATALOG, new String[]{"default"}));
+ testValidSqlCommand("use default", new
SqlCommandCall(SqlCommand.USE_DATABASE, new String[] {"default"}));
Review comment:
can we add some negative tests?
----------------------------------------------------------------
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