rdblue commented on a change in pull request #1477:
URL: https://github.com/apache/iceberg/pull/1477#discussion_r496317201



##########
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:
       In Avro, the write schema -- that was used to encode a record -- is 
required in order to correctly read the record. Because this doesn't encode 
anything about the write schema that was used, the bytes will no longer be 
readable if the schema changes.
   
   The checkpoint state will need to store the `ManifestFile` Avro schema 
string and this would need a way to pass the Avro schema string into decode.




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

Reply via email to