leonardBang commented on a change in pull request #16060:
URL: https://github.com/apache/flink/pull/16060#discussion_r646222862



##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliStrings.java
##########
@@ -39,82 +39,175 @@ private CliStrings() {
     public static final AttributedString MESSAGE_HELP =
             new AttributedStringBuilder()
                     .append("The following commands are available:\n\n")
+                    // About base commands.
+                    .append(formatCommand("HELP", "Prints the available 
commands."))
                     .append(formatCommand("CLEAR", "Clears the current 
terminal."))
+                    .append(formatCommand("QUIT", "Quits the SQL CLI client."))
                     .append(
                             formatCommand(
-                                    "CREATE TABLE",
-                                    "Create table under current catalog and 
database."))
+                                    "EXIT",
+                                    "Exits the SQL CLI client, which is the 
same as 'QUIT'."))
+                    // About 'CREATE' statements commands.
+                    .append("\n")
                     .append(
                             formatCommand(
-                                    "DROP TABLE",
-                                    "Drop table with optional catalog and 
database. Syntax: 'DROP TABLE [IF EXISTS] <name>;'"))
+                                    "CREATE CATALOG",
+                                    "Creates a catalog. Syntax: 'CREATE 
CATALOG <catalog_name> WITH (<k1>=<v1>, ...);'."))
+                    .append(
+                            formatCommand(
+                                    "CREATE DATABASE",
+                                    "Creates a database. Syntax: 'CREATE 
DATABASE [IF NOT EXISTS] [<catalog_name>.]<db_name> [COMMENT <comment>] WITH 
(<k1>=<v1>, ...);'."))
+                    .append(
+                            formatCommand(
+                                    "CREATE TABLE",

Review comment:
       Also given the `CREATE TABLE` Syntax ?

##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliStrings.java
##########
@@ -39,82 +39,175 @@ private CliStrings() {
     public static final AttributedString MESSAGE_HELP =
             new AttributedStringBuilder()
                     .append("The following commands are available:\n\n")
+                    // About base commands.
+                    .append(formatCommand("HELP", "Prints the available 
commands."))
                     .append(formatCommand("CLEAR", "Clears the current 
terminal."))
+                    .append(formatCommand("QUIT", "Quits the SQL CLI client."))
                     .append(
                             formatCommand(
-                                    "CREATE TABLE",
-                                    "Create table under current catalog and 
database."))
+                                    "EXIT",
+                                    "Exits the SQL CLI client, which is the 
same as 'QUIT'."))
+                    // About 'CREATE' statements commands.
+                    .append("\n")
                     .append(
                             formatCommand(
-                                    "DROP TABLE",
-                                    "Drop table with optional catalog and 
database. Syntax: 'DROP TABLE [IF EXISTS] <name>;'"))
+                                    "CREATE CATALOG",
+                                    "Creates a catalog. Syntax: 'CREATE 
CATALOG <catalog_name> WITH (<k1>=<v1>, ...);'."))
+                    .append(
+                            formatCommand(
+                                    "CREATE DATABASE",
+                                    "Creates a database. Syntax: 'CREATE 
DATABASE [IF NOT EXISTS] [<catalog_name>.]<db_name> [COMMENT <comment>] WITH 
(<k1>=<v1>, ...);'."))
+                    .append(
+                            formatCommand(
+                                    "CREATE TABLE",
+                                    "Creates table under current catalog and 
database."))
                     .append(
                             formatCommand(
                                     "CREATE VIEW",
-                                    "Creates a virtual table from a SQL query. 
Syntax: 'CREATE VIEW <name> AS <query>;'"))
+                                    "Creates a virtual table from a SQL query. 
Syntax: 'CREATE VIEW <view_name> AS <query_statement>;'."))
                     .append(
                             formatCommand(
-                                    "DESCRIBE",
-                                    "Describes the schema of a table with the 
given name."))
+                                    "CREATE FUNCTION",
+                                    "Creates a function. Syntax: 'CREATE 
[TEMPORARY|TEMPORARY SYSTEM] FUNCTION [IF NOT EXISTS] 
[<catalog_name>.][<db_name> .]<func_name> AS <identifier> [LANGUAGE 
JAVA|SCALA|PYTHON];'."))
+                    // About 'DROP' statements commands.
+                    .append("\n")
+                    .append(
+                            formatCommand(
+                                    "DROP CATALOG",
+                                    "Drops a catalog with the given catalog 
name. Syntax: 'DROP CATALOG [IF EXISTS] <catalog_name>;'."))
+                    .append(
+                            formatCommand(
+                                    "DROP DATABASE",
+                                    "Drops a database with the given database 
name. Syntax: 'DROP DATABASE [IF EXISTS] [<catalog_name>.]<db_name> [ (RESTRICT 
| CASCADE) ];'."))
+                    .append(
+                            formatCommand(
+                                    "DROP TABLE",
+                                    "Drops table with optional catalog and 
database. Syntax: 'DROP TABLE [IF EXISTS] [<catalog_name>.][<db_name> 
.]<table_name>;'."))
                     .append(
                             formatCommand(
                                     "DROP VIEW",
-                                    "Deletes a previously created virtual 
table. Syntax: 'DROP VIEW <name>;'"))
+                                    "Drops a previously created virtual table. 
Syntax: 'DROP [TEMPORARY] VIEW  [IF EXISTS] 
[<catalog_name>.][<db_name>.]<view_name>;'."))
+                    .append(
+                            formatCommand(
+                                    "DROP FUNCTION",
+                                    "Drops a catalog function that has catalog 
and database namespaces. Syntax: 'DROP [TEMPORARY|TEMPORARY SYSTEM] FUNCTION 
[IF EXISTS] [<catalog_name>.][<db_name>.]<func_name>;'."))
+                    // About 'ALTER' statements commands.
+                    .append("\n")
+                    .append(
+                            formatCommand(
+                                    "ALTER DATABASE",
+                                    "Sets property(ies) in the specified 
database. Syntax: 'ALTER DATABASE [<catalog_name>.]<db_name> SET (<k1>=<v1>, 
...);'."))

Review comment:
       ```suggestion
                                       "Sets one or more properties in the 
specified database. Syntax: 'ALTER DATABASE [<catalog_name>.]<db_name> SET 
(<k1>=<v1>, ...);'."))
   ```




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


Reply via email to