RussellSpitzer commented on a change in pull request #1795:
URL: https://github.com/apache/iceberg/pull/1795#discussion_r527822760



##########
File path: core/src/main/java/org/apache/iceberg/RemoveSnapshots.java
##########
@@ -78,6 +81,10 @@ public void accept(String file) {
   RemoveSnapshots(TableOperations ops) {
     this.ops = ops;
     this.base = ops.current();
+
+    ValidationException.check(
+        !PropertyUtil.propertyAsBoolean(base.properties(), SNAPSHOT, 
SNAPSHOT_DEFAULT),
+        "Not allowed to expire snapshots in a snapshot table as this may 
remove files in the original table");

Review comment:
       "The target table was created using the snapshot action against another 
table which means it is not the exclusive owner of its data files. This means 
that we cannot determine if data files are actually no longer needed after 
running an expireSnapshots command and could unintentionally remove files 
needed by the original table." -- Maybe?




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

Reply via email to