kasakrisz commented on code in PR #3934:
URL: https://github.com/apache/hive/pull/3934#discussion_r1073259594


##########
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java:
##########
@@ -3122,7 +3117,19 @@ Seems much cleaner if each stmt is identified as a 
particular HiveOperation (whi
     }
     return lockComponents;
   }
-  
+
+  private static LockType getLockTypeFromStorageHandler(WriteEntity output, 
Table t) {
+    final HiveStorageHandler storageHandler = 
Preconditions.checkNotNull(t.getStorageHandler(),
+        "Non-native tables must have an instance of storage handler.");
+    LockType lockType = storageHandler.getLockType(output);
+    if (null == LockType.findByValue(lockType.getValue())) {
+      throw new IllegalArgumentException(String
+          .format("Lock type [%s] for Database.Table [%s.%s] is unknown", 
lockType, t.getDbName(),

Review Comment:
   `getCompleteName()` uses `@` as separator char. I think without quoting db 
and table identifiers both separator chars (`.` and `@`) adds the same value 
since both of them can be part of the identifier.
   In this case this is not an issue because we just add the name to an 
exception message and the message also contains the format.



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