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


##########
core/src/main/java/org/apache/iceberg/V4Metadata.java:
##########
@@ -701,20 +687,44 @@ private static Map<Integer, StructProjection> 
partitionProjections(
     }
   }
 
+  static Schema leafManifestSchema(Types.StructType partitionType, 
Types.StructType statsType) {
+    return new Schema(
+        
Types.NestedField.from(TrackedFile.TRACKING).ofType(LEAF_TRACKING_TYPE).build(),
+        TrackedFile.CONTENT_TYPE,
+        TrackedFile.LOCATION,
+        TrackedFile.FILE_FORMAT,
+        TrackedFile.RECORD_COUNT,
+        TrackedFile.FILE_SIZE_IN_BYTES,
+        TrackedFile.SPEC_ID,
+        Types.NestedField.optional(
+            TrackedFile.PARTITION_ID,
+            TrackedFile.PARTITION_NAME,
+            partitionType.fields().isEmpty() ? Types.UnknownType.get() : 
partitionType,
+            TrackedFile.PARTITION_DOC),
+        Types.NestedField.optional(
+            TrackedFile.CONTENT_STATS_ID,
+            TrackedFile.CONTENT_STATS_NAME,
+            statsType.fields().isEmpty() ? Types.UnknownType.get() : statsType,
+            TrackedFile.CONTENT_STATS_DOC),
+        TrackedFile.TIGHT_STATS,
+        TrackedFile.SORT_ORDER_ID,
+        
Types.NestedField.from(TrackedFile.DELETION_VECTOR).ofType(DELETION_VECTOR_TYPE).build(),

Review Comment:
   add it as an inline comment?



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