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(
wlc -> cmd[0].trim().equalsIgnoreCase(wlc) ||
hiveCommand.name().equalsIgnoreCase(wlc));
````
##########
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(
wlc -> cmd[0].trim().equalsIgnoreCase(wlc) ||
hiveCommand.name().equalsIgnoreCase(wlc));
````
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]