SteNicholas commented on code in PR #772:
URL: https://github.com/apache/incubator-paimon/pull/772#discussion_r1159484604


##########
paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java:
##########
@@ -208,6 +208,16 @@ public void dropTable(Identifier identifier, boolean 
ignoreIfNotExists)
                     identifier.getDatabaseName(), identifier.getObjectName(), 
true, false, true);
         } catch (TException e) {
             throw new RuntimeException("Failed to drop table " + 
identifier.getFullName(), e);
+        } finally {
+            // Deletes table directory to avoid schema in filesystem exists.
+            Path path = getDataTableLocation(identifier);
+            try {
+                if (fileIO.exists(path)) {
+                    fileIO.deleteDirectoryQuietly(path);

Review Comment:
   @FangYongs, I think this again. It's better to delete table directory in 
filesystem after dropping hive table successfully. Because we should keep the 
table consistency between which in filesystem and which in Hive metastore, 
otherwise the `listTables` behavior is inconsistent.



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

Reply via email to