pvary commented on a change in pull request #2772:
URL: https://github.com/apache/hive/pull/2772#discussion_r771280308



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/drop/DropTableAnalyzer.java
##########
@@ -51,7 +55,14 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
     Table table = getTable(tableName, throwException);
     if (table != null) {
       inputs.add(new ReadEntity(table));
-      outputs.add(new WriteEntity(table, WriteEntity.WriteType.DDL_EXCLUSIVE));
+
+      boolean tableWithSuffix = (HiveConf.getBoolVar(conf, 
ConfVars.HIVE_ACID_CREATE_TABLE_USE_SUFFIX)
+          || HiveConf.getBoolVar(conf, 
ConfVars.HIVE_ACID_LOCKLESS_READS_ENABLED))
+        && AcidUtils.isTransactionalTable(table)
+        && table.getSd().getLocation().matches(V_TABLE_PATTERN);

Review comment:
       Might have issues with legacy tables with where the name (and location) 
ends with `_v1`.
   Would it cause problems?
   - Say I have an old table users_v2
   - Switch on the `HIVE_ACID_CREATE_TABLE_USE_SUFFIX`
   - Drop the table?
   




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