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


##########
core/src/main/java/org/apache/iceberg/TrackedFileStruct.java:
##########
@@ -210,14 +214,27 @@ public long fileSizeInBytes() {
     return fileSizeInBytes;
   }
 
+  void setPartitionType(Types.StructType newPartitionType) {
+    this.partitionType = newPartitionType;
+  }
+
   @Override
   public Integer specId() {
     return specId;
   }
 
   @Override
   public StructLike partition() {
-    return partitionData;
+    if (partitionData == null
+        || partitionType == null
+        || partitionData.getPartitionType().equals(partitionType)) {
+      return partitionData;
+    }
+
+    return new PartitionData(partitionType)

Review Comment:
   Not a problem anymore: added caching.



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