danielcweeks commented on a change in pull request #1156:
URL: https://github.com/apache/iceberg/pull/1156#discussion_r451881098
##########
File path: core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java
##########
@@ -110,9 +110,17 @@ public Transaction newReplaceTableTransaction(
throw new NoSuchTableException("No such table: " + identifier);
}
- String baseLocation = location != null ? location :
defaultWarehouseLocation(identifier);
Map<String, String> tableProperties = properties != null ? properties :
Maps.newHashMap();
- TableMetadata metadata = TableMetadata.newTableMetadata(schema, spec,
baseLocation, tableProperties);
+
+ TableMetadata metadata;
+ if (ops.current() != null) {
Review comment:
ok, I guess that makes sense. I assumed the semantics to be the same a
transactional `drop` and `create`, but based on a little searching, it's much
less clear than that. For example, with db2 create or replace will actually
retain all data (assuming if aligns with the new table definition) by default.
I agree that preserving table properties make sense, but wouldn't this wipe
out comments (which we may also want to preserve)
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]