ebyhr commented on code in PR #16073:
URL: https://github.com/apache/iceberg/pull/16073#discussion_r3120635221
##########
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);
Review Comment:
Is there any way to check whether the target table exists in S3 Table
bucket?
##########
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) {
+ LOG.warn(
+ "Failed to purge data for table: {}, continuing drop without
purge", identifier, e);
Review Comment:
The table has already been dropped by the time we reach this line, so this
change makes sense to me.
The Trino Iceberg connector also suppresses failures when it cannot delete
data using the Glue catalog:
https://github.com/trinodb/trino/blob/5a116341b53f9f3a3b29b8b405773010e307e40b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/glue/TrinoGlueCatalog.java#L676-L696
--
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]