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


##########
core/src/main/java/org/apache/iceberg/rest/RESTSerializers.java:
##########
@@ -75,7 +78,12 @@ public static void registerAll(ObjectMapper mapper) {
         .addSerializer(UpdateRequirement.class, new 
UpdateRequirementSerializer())
         .addDeserializer(UpdateRequirement.class, new 
UpdateRequirementDeserializer())
         .addSerializer(OAuthTokenResponse.class, new 
OAuthTokenResponseSerializer())
-        .addDeserializer(OAuthTokenResponse.class, new 
OAuthTokenResponseDeserializer());
+        .addDeserializer(OAuthTokenResponse.class, new 
OAuthTokenResponseDeserializer())
+        .addSerializer(ReportMetricsRequest.class, new 
ReportMetricsRequestSerializer<>())
+        .addDeserializer(ReportMetricsRequest.class, new 
ReportMetricsRequestDeserializer<>())
+        .addSerializer(ImmutableReportMetricsRequest.class, new 
ReportMetricsRequestSerializer<>())

Review Comment:
   I'll look into this in a follow-up. I was expecting that registering a 
custom serializer/deserializer for `ReportMetricsRequest` would also work 
out-of-the-box for `ImmutableReportMetricsRequest` but apparently that's not 
the case and it requires the subclass to be registered explicitly



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