deniskuzZ commented on code in PR #5319:
URL: https://github.com/apache/hive/pull/5319#discussion_r1890156195


##########
ql/src/java/org/apache/hadoop/hive/ql/processors/CommandProcessorFactory.java:
##########
@@ -64,7 +64,10 @@ public static CommandProcessor 
getForHiveCommandInternal(String[] cmd, HiveConf
       .split(",")) {
       availableCommands.add(availableCommand.toLowerCase().trim());
     }
-    if (!availableCommands.contains(cmd[0].trim().toLowerCase())) {
+    // HIVE-27829 : Added another condition for Show Processlist command as 
"show" is not included in availableCommands.
+    boolean isHiveCommand = 
availableCommands.contains(cmd[0].trim().toLowerCase()) ||

Review Comment:
   ````
   boolean isWhitelistedCommand = availableCommands.stream().anyMatch(
       c -> cmd[0].trim().equalsIgnoreCase(c) || 
hiveCommand.name().equalsIgnoreCase(c));
   ````



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to