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/12/01 07:38:03 UTC

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

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


##########
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:
   I've slightly adjusted the code so that in the unlikely event that both fields are defined, we take the new one



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