stevenzwu commented on code in PR #17322:
URL: https://github.com/apache/iceberg/pull/17322#discussion_r3635739342


##########
core/src/main/java/org/apache/iceberg/FieldStatsStruct.java:
##########
@@ -54,8 +54,8 @@ class FieldStatsStruct<T> implements FieldStats<T>, 
StructLike, Serializable {
       T upperBound,
       boolean tightBounds,
       long valueCount,
-      long nullValueCount,
-      long nanValueCount,
+      Long nullValueCount,

Review Comment:
   The existing code already has trouble construct the `FieldStatsStruct` 
properly. Because the constructor can't pass in null, `0L` is passed in for the 
`nanValueCount` for an integer field. E.g., this code from 
[TestTrackedFileAdapters](https://github.com/apache/iceberg/blob/main/core/src/test/java/org/apache/iceberg/TestTrackedFileAdapters.java#L72).
   ```
     private static final FieldStats<Integer> ID_STATS =
         new FieldStatsStruct<>(
             CONTENT_STATS_TYPE.fieldType("id").asStructType(), 1, 1000, true, 
100L, 5L, 0L, null);
                                                                                
                                                                    ^^^
   ```



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