wuchong commented on a change in pull request #15203:
URL: https://github.com/apache/flink/pull/15203#discussion_r594018241



##########
File path: docs/dev/table/sqlClient.md
##########
@@ -45,10 +45,10 @@ The SQL Client is bundled in the regular Flink distribution 
and thus runnable ou
 
 ### Starting the SQL Client CLI
 
-The SQL Client scripts are also located in the binary directory of Flink. [In 
the future](sqlClient.html#limitations--future), a user will have two 
possibilities of starting the SQL Client CLI either by starting an embedded 
standalone process or by connecting to a remote SQL Client Gateway. At the 
moment only the `embedded` mode is supported. You can start the CLI by calling:
+The SQL Client scripts are also located in the binary directory of Flink. [In 
the future](sqlClient.html#limitations--future), a user will have two 
possibilities of starting the SQL Client CLI either by starting an embedded 
standalone process or by connecting to a remote SQL Client Gateway. At the 
moment only the `embedded` mode is supported,default mode value `embedded`. You 
can start the CLI by calling:
 
 {% highlight bash %}
-./bin/sql-client.sh embedded
+./bin/sql-client.sh embedded(default mode value embedded)

Review comment:
       ```suggestion
   ./bin/sql-client.sh
   ```
   
   This is a command, do not explain in command, otherwise, users may copy the 
command and execute it. 

##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/SqlClient.java
##########
@@ -184,8 +185,14 @@ private static void appendPythonConfig(Environment env, 
Configuration pythonConf
 
     public static void main(String[] args) {
         if (args.length < 1) {
-            CliOptionsParser.printHelpClient();
-            return;
+            args = new String[]{MODE_EMBEDDED};

Review comment:
       I think updating the `args` is not a good idea. Actually, we don't need 
to update args. You can use a `String mode` local variable and put remaining 
args into `final String[] modeArgs`. 
   
   

##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/SqlClient.java
##########
@@ -184,8 +185,14 @@ private static void appendPythonConfig(Environment env, 
Configuration pythonConf
 
     public static void main(String[] args) {
         if (args.length < 1) {
-            CliOptionsParser.printHelpClient();
-            return;
+            args = new String[]{MODE_EMBEDDED};
+        } else {
+            String mode = args[0];
+            if (!MODE_EMBEDDED.equals(mode)) {

Review comment:
       We should add the MODE_EMBEDDED only when the first arg starts with `-`  
(which are options). 
   
   Otherwise, `sql-client.sh gateway` may changed to `sql-client.sh embedded 
gateway` which is not expected. 

##########
File path: docs/dev/table/sqlClient.md
##########
@@ -45,10 +45,10 @@ The SQL Client is bundled in the regular Flink distribution 
and thus runnable ou
 
 ### Starting the SQL Client CLI
 
-The SQL Client scripts are also located in the binary directory of Flink. [In 
the future](sqlClient.html#limitations--future), a user will have two 
possibilities of starting the SQL Client CLI either by starting an embedded 
standalone process or by connecting to a remote SQL Client Gateway. At the 
moment only the `embedded` mode is supported. You can start the CLI by calling:
+The SQL Client scripts are also located in the binary directory of Flink. [In 
the future](sqlClient.html#limitations--future), a user will have two 
possibilities of starting the SQL Client CLI either by starting an embedded 
standalone process or by connecting to a remote SQL Client Gateway. At the 
moment only the `embedded` mode is supported,default mode value `embedded`. You 
can start the CLI by calling:

Review comment:
       ```suggestion
   The SQL Client scripts are also located in the binary directory of Flink. 
[In the future](sqlClient.html#limitations--future), a user will have two 
possibilities of starting the SQL Client CLI either by starting an embedded 
standalone process or by connecting to a remote SQL Client Gateway. At the 
moment only the `embedded` mode is supported,and default mode is `embedded`. 
You can start the CLI by calling:
   ```




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