ricardopereira33 commented on code in PR #12670: URL: https://github.com/apache/iceberg/pull/12670#discussion_r2022760047
########## core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java: ########## @@ -150,7 +148,7 @@ private MetadataUpdateParser() {} .put(MetadataUpdate.SetPartitionStatistics.class, SET_PARTITION_STATISTICS) .put(MetadataUpdate.RemovePartitionStatistics.class, REMOVE_PARTITION_STATISTICS) .put(MetadataUpdate.AddSnapshot.class, ADD_SNAPSHOT) - .put(MetadataUpdate.RemoveSnapshot.class, REMOVE_SNAPSHOTS) + .put(MetadataUpdate.RemoveSnapshots.class, REMOVE_SNAPSHOTS) Review Comment: @nastra @amogh-jahagirdar In order to keep both `RemoveSnapshot` (deprecated) and `RemoveSnapshots` (new), we need to define a custom process when we are parsing the metadata updates from the JSON. Currently, `RemoveSnapshot` is pointing to the keyword [remove-snapshots](https://github.com/apache/iceberg/blob/e55f23858848bb848a1a16ae1ee045139ffe89fc/core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java#L50). https://github.com/apache/iceberg/blob/e55f23858848bb848a1a16ae1ee045139ffe89fc/core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java#L50 To add a new MetadataUpdate option `RemoveSnapshots`, the alternatives are: - Reuse the same keyword, and add a custom condition to distinguish `RemoveSnapshot` and `RemoveSnapshots`. - Create a new keyword and have different parsing process for each metadata update. However, the current protocol expects a list of values for the key `remove-snapshots`, so even if we replace the `RemoveSnapshot` completely, we are still using the protocol correctly. WDYT about this? -- 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