You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/07/02 08:52:17 UTC

[GitHub] [iceberg] openinx commented on a change in pull request #1161: Fix errors when use removeOrphanFiles By HadoopCatalog

openinx commented on a change in pull request #1161:
URL: https://github.com/apache/iceberg/pull/1161#discussion_r448850172



##########
File path: spark/src/main/java/org/apache/iceberg/actions/BaseAction.java
##########
@@ -30,8 +31,11 @@ protected String metadataTableName(MetadataTableType type) {
     String tableName = table().toString();
     if (tableName.contains("/")) {
       return tableName + "#" + type;
-    } else if (tableName.startsWith("hadoop.") || tableName.startsWith("hive.")) {
-      // HiveCatalog and HadoopCatalog prepend a logical name which we need to drop for Spark 2.4
+    } else if (tableName.startsWith("hadoop.")) {
+      // HadoopCatalog tableName style is 'hadoop.ns.tb'
+      return ((BaseTable) table()).operations().current().location() + "#" + type;

Review comment:
       Is possible to provide a unit test addressing your changes ? 
   Thanks.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org