rdblue commented on code in PR #4632:
URL: https://github.com/apache/iceberg/pull/4632#discussion_r860135116


##########
core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java:
##########
@@ -140,21 +170,73 @@ public static MetadataUpdate fromJson(JsonNode jsonNode) {
         throw new UnsupportedOperationException("Not implemented: AssignUUID");
       case UPGRADE_FORMAT_VERSION:
         return readAsUpgradeFormatVersion(jsonNode);
+      case ADD_SCHEMA:
+        return readAsAddSchema(jsonNode);
+      case SET_CURRENT_SCHEMA:
+        return readAsSetCurrentSchema(jsonNode);
+      case SET_DEFAULT_PARTITION_SPEC:
+        return readAsSetDefaultPartitionSpec(jsonNode);
+      case ADD_PARTITION_SPEC:
+      case ADD_SORT_ORDER:
+      case SET_DEFAULT_SORT_ORDER:
+      case ADD_SNAPSHOT:
+      case REMOVE_SNAPSHOTS:
+      case SET_SNAPSHOT_REF:
+      case SET_PROPERTIES:
+      case REMOVE_PROPERTIES:
+      case SET_LOCATION:
+        throw new UnsupportedOperationException("Not Implemented: 
MetadataUpdatefromJson for " + action);
       default:
         throw new UnsupportedOperationException(
             String.format("Cannot convert metadata update action to json: %s", 
action));
     }
   }
 
-  // Write all fields specific to UpgradeFormatVersion
-  private static void 
writeUpgradeFormatVersion(MetadataUpdate.UpgradeFormatVersion update, 
JsonGenerator gen)
+  private static void 
writeAsUpgradeFormatVersion(MetadataUpdate.UpgradeFormatVersion update, 
JsonGenerator gen)

Review Comment:
   I don't think the names make sense with `As`. I think it's okay if it 
doesn't quite match. I'd opt for names that you can read easily.



-- 
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: [email protected]

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