You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/30 19:22:55 UTC

[GitHub] [iceberg] danielcweeks commented on a diff in pull request #6317: Core: MetadataUpdateParser should write updates/removals fields rather than updated/removed

danielcweeks commented on code in PR #6317:
URL: https://github.com/apache/iceberg/pull/6317#discussion_r1036360113


##########
core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java:
##########
@@ -471,13 +477,26 @@ private static MetadataUpdate readRemoveSnapshotRef(JsonNode node) {
   }
 
   private static MetadataUpdate readSetProperties(JsonNode node) {
-    Map<String, String> updated = JsonUtil.getStringMap(UPDATED, node);
-    return new MetadataUpdate.SetProperties(updated);
+    Map<String, String> updates;
+    // first read UPDATED for backward compatibility
+    if (node.has(UPDATED)) {

Review Comment:
   nit: I think you should always check the correct property first, so we don't prioritize the obsolete one.  This is pretty minor because you likely wouldn't have both.



-- 
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-unsubscribe@iceberg.apache.org

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


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