nastra commented on code in PR #9852:
URL: https://github.com/apache/iceberg/pull/9852#discussion_r1758340280


##########
core/src/main/java/org/apache/iceberg/CatalogUtil.java:
##########
@@ -137,6 +138,18 @@ public static void dropTableData(FileIO io, TableMetadata 
metadata) {
     deleteFile(io, metadata.metadataFileLocation(), "metadata");
   }
 
+  /**
+   * Drops view metadata files referenced by ViewMetadata.
+   *
+   * <p>This should be called by dropView implementations
+   *
+   * @param io a FileIO to use for deletes
+   * @param metadata the last valid ViewMetadata instance for a dropped view.
+   */
+  public static void dropViewMetadata(FileIO io, ViewMetadata metadata) {
+    deleteFile(io, metadata.metadataFileLocation(), "metadata");

Review Comment:
   @danielcweeks it looks like for the table case we don't respect the gc flag 
when dropping the metadata file itself: 
https://github.com/apache/iceberg/blob/bd35447383f3aafa51436f0d45e15d240cfecb47/core/src/main/java/org/apache/iceberg/CatalogUtil.java#L138
   I'm ok either way but I think we should be consistent with how we do it for 
tables (aka not respecting the gc flag when deleting view metadata)



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to