rdblue commented on code in PR #18108:
URL: https://github.com/apache/iceberg/pull/18108#discussion_r4138471771


##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -153,6 +154,12 @@ private TrackedFile applyInheritance(TrackedFile file) {
       }
     }
 
+    Integer specId = file.specId();
+    PartitionSpec spec = specId != null ? specsById.get(specId) : null;
+    if (file instanceof TrackedFileStruct) {
+      ((TrackedFileStruct) file).setPartitionType(spec != null ? 
spec.partitionType() : null);

Review Comment:
   There's no need to check using `instanceof`. As the comments above state, 
the `InternalData` reader is configured to use `TrackingStruct` and in this 
case, `TrackedFileStruct` so we can assume that here.



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