aokolnychyi commented on code in PR #8346:
URL: https://github.com/apache/iceberg/pull/8346#discussion_r1298966488


##########
core/src/main/java/org/apache/iceberg/BaseFileScanTask.java:
##########
@@ -28,6 +28,10 @@ public class BaseFileScanTask extends 
BaseContentScanTask<FileScanTask, DataFile
     implements FileScanTask {
   private final DeleteFile[] deletes;
 
+  // lazy variables
+  private transient volatile List<DeleteFile> deletesAsList = null;
+  private transient volatile Long deletesSizeBytes = null;

Review Comment:
   Using primitive values initialized to a custom value is not safe with custom 
serialization. Some Flink tests started to fail as variables were initialized 
to 0 after deserialization. Switched back to `Long`. Yes, we would box but I am 
not sure computing this value in the constructor would be a good idea for 
`BaseFileScanTask`, which is constructed by `planFiles` and may not be used for 
split planning.



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