rdblue commented on a change in pull request #3097:
URL: https://github.com/apache/iceberg/pull/3097#discussion_r706859413
##########
File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopCatalog.java
##########
@@ -252,21 +252,19 @@ public boolean dropTable(TableIdentifier identifier,
boolean purge) {
Path tablePath = new Path(defaultWarehouseLocation(identifier));
TableOperations ops = newTableOps(identifier);
- TableMetadata lastMetadata;
- if (purge && ops.current() != null) {
- lastMetadata = ops.current();
- } else {
- lastMetadata = null;
- }
-
+ TableMetadata lastMetadata = ops.current();
try {
- if (purge && lastMetadata != null) {
- // Since the data files and the metadata files may store in different
locations,
- // so it has to call dropTableData to force delete the data file.
- CatalogUtil.dropTableData(ops.io(), lastMetadata);
+ if (lastMetadata == null) {
+ LOG.error("Not an iceberg table: %s", identifier);
Review comment:
This is not an error. The API states that if the table doesn't exist,
then the catalog should return false. If you want to add a debug log, that's
fine. But this should not be info or error level.
--
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]