geruh commented on code in PR #16073:
URL: https://github.com/apache/iceberg/pull/16073#discussion_r3134285066


##########
aws/src/main/java/org/apache/iceberg/aws/glue/GlueCatalog.java:
##########
@@ -356,8 +356,13 @@ public boolean dropTable(TableIdentifier identifier, 
boolean purge) {
               .build());
       LOG.info("Successfully dropped table {} from Glue", identifier);
       if (purge && lastMetadata != null) {
-        CatalogUtil.dropTableData(ops.io(), lastMetadata);

Review Comment:
   Technically, s3tables is purging data behind the scenes right. So in the 
case of `dropTable(identifier, false)` we should throw and force the user to be 
specific about purging. 



##########
aws/src/main/java/org/apache/iceberg/aws/glue/GlueCatalog.java:
##########
@@ -356,8 +356,13 @@ public boolean dropTable(TableIdentifier identifier, 
boolean purge) {
               .build());
       LOG.info("Successfully dropped table {} from Glue", identifier);
       if (purge && lastMetadata != null) {
-        CatalogUtil.dropTableData(ops.io(), lastMetadata);
-        LOG.info("Glue table {} data purged", identifier);
+        try {
+          CatalogUtil.dropTableData(ops.io(), lastMetadata);
+          LOG.info("Glue table {} data purged", identifier);
+        } catch (Exception e) {

Review Comment:
   I'm hesitant against this broad of an exception. We should be strict in what 
we are catching here it's a purge that other use cases could hit.



##########
aws/src/test/java/org/apache/iceberg/aws/glue/TestGlueCatalog.java:
##########
@@ -312,6 +316,44 @@ public void testDropTable() {
     glueCatalog.dropTable(TableIdentifier.of("db1", "t1"));
   }
 
+  @Test
+  public void testDropTableWithPurgeFailure() {

Review Comment:
   Were you able to test this functionality against a real s3tables catalog?



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