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 2021/09/17 18:45:47 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #3056: Support purge for Spark 3.1.x

rdblue commented on a change in pull request #3056:
URL: https://github.com/apache/iceberg/pull/3056#discussion_r711277474



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -230,16 +230,25 @@ public SparkTable alterTable(Identifier ident, TableChange... changes) throws No
   }
 
   @Override
-  public boolean dropTable(Identifier ident) {
+  protected boolean dropTableWithPurge(Identifier ident, boolean purge) {
     try {
       return isPathIdentifier(ident) ?
-          tables.dropTable(((PathIdentifier) ident).location()) :
-          icebergCatalog.dropTable(buildIdentifier(ident));
+          tables.dropTable(((PathIdentifier) ident).location(), purge) :
+          icebergCatalog.dropTable(buildIdentifier(ident), purge);
     } catch (org.apache.iceberg.exceptions.NoSuchTableException e) {
       return false;
     }
   }
 
+  @Override
+  public boolean dropTable(Identifier ident) {
+    return dropTableWithPurge(ident, false);
+  }
+
+  public boolean purgeTable(Identifier ident) throws UnsupportedOperationException {

Review comment:
       This doesn't throw `UnsupportedOperationException`.




-- 
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: issues-unsubscribe@iceberg.apache.org

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