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


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/lock/show/ShowLocksAnalyzer.java:
##########
@@ -44,29 +49,51 @@ public ShowLocksAnalyzer(QueryState queryState) throws 
SemanticException {
   public void analyzeInternal(ASTNode root) throws SemanticException {
     ctx.setResFile(ctx.getLocalTmpPath());
 
-    String tableName = null;
+    String fullyQualifiedTableName = null;
     Map<String, String> partitionSpec = null;
     boolean isExtended = false;
     if (root.getChildCount() >= 1) {
       // table for which show locks is being executed
       for (int i = 0; i < root.getChildCount(); i++) {
         ASTNode child = (ASTNode) root.getChild(i);
         if (child.getType() == HiveParser.TOK_TABTYPE) {
-          tableName = DDLUtils.getFQName((ASTNode) child.getChild(0));
+          fullyQualifiedTableName = DDLUtils.getFQName((ASTNode) 
child.getChild(0));
           // get partition metadata if partition specified
           if (child.getChildCount() == 2) {
             ASTNode partitionSpecNode = (ASTNode) child.getChild(1);
-            partitionSpec = getValidatedPartSpec(getTable(tableName), 
partitionSpecNode, conf, false);
+            partitionSpec = 
getValidatedPartSpec(getTable(fullyQualifiedTableName), partitionSpecNode, 
conf, false);
           }
         } else if (child.getType() == HiveParser.KW_EXTENDED) {
           isExtended = true;
         }
       }
     }
 
+    String catalogName = null;
+    String dbName = null;
+    String tableName = null;
+
+    if (fullyQualifiedTableName != null) {
+      String defaultDatabase = SessionState.get() != null

Review Comment:
   could you please create JIRA for that so we won't forget



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

Reply via email to