wypoon commented on a change in pull request #3852:
URL: https://github.com/apache/iceberg/pull/3852#discussion_r779224225



##########
File path: core/src/main/java/org/apache/iceberg/SnapshotParser.java
##########
@@ -89,8 +89,12 @@ static void toJson(Snapshot snapshot, JsonGenerator 
generator)
       generator.writeEndArray();
     }
 
-    // schema ID might be null for snapshots written by old writers
-    if (snapshot.schemaId() != null) {
+    // For test purposes, we want to emulate an old writer; we do this if the 
system property
+    // iceberg.snapshot.no-schema-id is set to true.
+    boolean noSchemaId = 
SystemProperties.getBoolean("iceberg.snapshot.no-schema-id", false);

Review comment:
       I'm open to suggestions for other ways of getting the metadata to be 
written without `schema-id` in the `snapshot`s, or even other ways of testing 
this. But this was a simple, unintrusive way (very little code change needed; 
in particular, no API changes needed).




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