rdblue commented on a change in pull request #2275:
URL: https://github.com/apache/iceberg/pull/2275#discussion_r642697996
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadataParser.java
##########
@@ -210,6 +211,21 @@ private static void toJson(TableMetadata metadata,
JsonGenerator generator) thro
}
generator.writeEndObject();
+ writeSnapshotRelated(metadata, generator);
+
+ generator.writeArrayFieldStart(METADATA_LOG);
+ for (MetadataLogEntry logEntry : metadata.previousFiles()) {
+ generator.writeStartObject();
+ generator.writeNumberField(TIMESTAMP_MS, logEntry.timestampMillis());
+ generator.writeStringField(METADATA_FILE, logEntry.file());
+ generator.writeEndObject();
+ }
+ generator.writeEndArray();
+
+ generator.writeEndObject();
+ }
+
+ private static void writeSnapshotRelated(TableMetadata metadata,
JsonGenerator generator) throws IOException {
Review comment:
It doesn't look like this refactor is necessary any more. It just
creates a method that is only used once. I don't think that this file needs to
change at all.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]