featzhang commented on code in PR #28145:
URL: https://github.com/apache/flink/pull/28145#discussion_r3228518967


##########
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/parser/SqlMultiLineParser.java:
##########
@@ -68,9 +72,18 @@ public class SqlMultiLineParser extends DefaultParser {
 
     public SqlMultiLineParser(
             SqlCommandParser parser, Executor executor, 
CliClient.ExecutionMode mode) {
+        this(parser, executor, mode, ignored -> {});

Review Comment:
   The no-op lambda `ignored -> {}` for non-interactive mode is clean.
   
   Minor: could make the intent clearer with a named constant or comment:
   ```java
   public SqlMultiLineParser(
           SqlCommandParser parser, Executor executor, CliClient.ExecutionMode 
mode) {
       this(parser, executor, mode, config -> {}); // no-op: non-interactive 
doesn't need config updates
   }
   ```
   
   Or extract:
   ```java
   private static final Consumer<ReadableConfig> NO_OP_CONFIG_UPDATE = config 
-> {};
   ```
   
   Just a style preference.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to