kbendick commented on code in PR #4538:
URL: https://github.com/apache/iceberg/pull/4538#discussion_r849780924
##########
core/src/main/java/org/apache/iceberg/rest/RESTSerializers.java:
##########
@@ -61,10 +63,19 @@ public static void registerAll(ObjectMapper mapper) {
.addSerializer(UnboundPartitionSpec.class, new
UnboundPartitionSpecSerializer())
.addDeserializer(UnboundPartitionSpec.class, new
UnboundPartitionSpecDeserializer())
.addSerializer(UnboundSortOrder.class, new
UnboundSortOrderSerializer())
- .addDeserializer(UnboundSortOrder.class, new
UnboundSortOrderDeserializer());
+ .addDeserializer(UnboundSortOrder.class, new
UnboundSortOrderDeserializer())
+ .addSerializer(TableMetadata.class, new TableMetadataSerializer());
mapper.registerModule(module);
}
+ public static class TableMetadataSerializer extends
JsonSerializer<TableMetadata> {
+ @Override
+ public void serialize(TableMetadata metadata, JsonGenerator gen,
SerializerProvider serializers)
+ throws IOException {
+ gen.writeRawValue(TableMetadataParser.toJson(metadata));
Review Comment:
Sure. That would be fine.
--
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]