wombatu-kun commented on code in PR #17000:
URL: https://github.com/apache/iceberg/pull/17000#discussion_r3492082128


##########
core/src/main/java/org/apache/iceberg/TrackedFile.java:
##########
@@ -106,7 +106,7 @@ static Types.StructType schemaWithContentStats(
         RECORD_COUNT,
         FILE_SIZE_IN_BYTES,
         SPEC_ID,
-        Types.NestedField.required(PARTITION_ID, PARTITION_NAME, 
partitionType, PARTITION_DOC),
+        Types.NestedField.optional(PARTITION_ID, PARTITION_NAME, 
partitionType, PARTITION_DOC),

Review Comment:
   Now that this field is optional, partition() can return null (for example a 
projection without the partition column, per 
TestTrackedFileStruct.projectionWithoutPartition). The partition() javadoc at 
line 145 still says only "Returns partition for this file as a StructLike", 
while the other optional getters in this interface all document "or null". 
Suggest noting the null case there, e.g. "or null if the partition is not 
present".



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