fsk119 commented on a change in pull request #15332:
URL: https://github.com/apache/flink/pull/15332#discussion_r600193100



##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java
##########
@@ -424,8 +424,14 @@ private void callReset(SqlCommandCall cmdCall) {
             else {
                 String key = cmdCall.operands[0].trim();
                 executor.resetSessionProperty(sessionId, key);
-                printRemovedAndDeprecatedKeyMessage(key);
-                if (!YamlConfigUtils.isRemovedKey(key)) {
+
+                boolean isRemovedKey = YamlConfigUtils.isRemovedKey(key);
+                boolean isDeprecatedKey = YamlConfigUtils.isDeprecatedKey(key);
+                if (isRemovedKey || isDeprecatedKey) {
+                    printRemovedAndDeprecatedKeyMessage(key);
+                }
+                // it's not removedKey, need to print info message
+                if (!isRemovedKey) {

Review comment:
       nit: Why don't use 
   ```
   if (...) {
   
   } else {
   ...
   }
   
   ```
   
   It seems deprecated key will also get into this if-block.




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