stevenzwu commented on code in PR #16688:
URL: https://github.com/apache/iceberg/pull/16688#discussion_r3370137648


##########
core/src/test/java/org/apache/iceberg/TestTrackedFileStruct.java:
##########
@@ -39,6 +39,8 @@ class TestTrackedFileStruct {
   // which appends ROW_POSITION after the Tracking schema fields.
   private static final int MANIFEST_POS_ORDINAL = 
Tracking.schema().fields().size();
 
+  private static final int WRITER_FORMAT_VERSION_V4 = 4;

Review Comment:
   Per the latest [spec PR 
#16025](https://github.com/apache/iceberg/pull/16025) text, 
`writer_format_version` is defined as `int (0: PRE-V4, 1: V4)` — "V4 writers 
must produce `writer_format_version` 1." The constant here uses 4, matching the 
older design-doc draft but not the spec PR's current text. The field's intent 
is a 0/1 PRE-V4/V4 flag rather than a parallel format-version int. Worth 
aligning before this lands.



##########
core/src/main/java/org/apache/iceberg/TrackedFile.java:
##########
@@ -110,7 +113,8 @@ static Types.StructType schemaWithContentStats(
         MANIFEST_INFO,
         KEY_METADATA,
         SPLIT_OFFSETS,
-        EQUALITY_IDS);
+        EQUALITY_IDS,
+        WRITER_FORMAT_VERSION);

Review Comment:
   Spec PR #16025 lists `writer_format_version` (157) immediately after 
`content_type` (134) and before `location` (100). Both are entry-level 
versioning/typing fields, so the spec's grouping reads more naturally than 
appending after `equality_ids`. Suggest moving this entry up to follow 
`CONTENT_TYPE,` (line 102) for readability and to match the spec table ordering.



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