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


##########
core/src/main/java/org/apache/iceberg/TrackedFileStruct.java:
##########
@@ -210,14 +207,27 @@ public long fileSizeInBytes() {
     return fileSizeInBytes;
   }
 
+  void setPartitionProjection(StructProjection projection) {
+    this.partitionProjection = projection;
+  }
+
+  void clearPartition() {
+    this.partition = null;
+    this.partitionProjection = null;
+  }
+
   @Override
   public Integer specId() {
     return specId;
   }
 
   @Override
   public StructLike partition() {
-    return partitionData;
+    if (partition == null || partitionProjection == null) {

Review Comment:
    Added the check. I went with `ValidationException` instead of 
`IllegalStateException` to reconcile this with your filter comment on the test 
below. 



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