openinx commented on a change in pull request #1477:
URL: https://github.com/apache/iceberg/pull/1477#discussion_r502772090
##########
File path: core/src/main/java/org/apache/iceberg/ManifestFiles.java
##########
@@ -149,6 +160,33 @@ private ManifestFiles() {
throw new UnsupportedOperationException("Cannot write manifest for table
version: " + formatVersion);
}
+ private static org.apache.avro.Schema getManifestAvroSchema() {
+ return AvroSchemaUtil.convert(ManifestFile.schema(), ImmutableMap.of(
+ ManifestFile.schema().asStruct(), GenericManifestFile.class.getName(),
+ ManifestFile.PARTITION_SUMMARY_TYPE,
GenericPartitionFieldSummary.class.getName()
+ ));
+ }
+
+ public static byte[] encode(ManifestFile manifestFile) throws IOException {
Review comment:
I agree that it's better to attach the AVRO write schema in the
serialized byte[]. In this case, the serialized byte[] only contains one
manifest entry, so we will need to attach the schema string for every
ManifestFile, seems like a waste. But I can not think of a better way.
----------------------------------------------------------------
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]