stevenzwu commented on code in PR #17322:
URL: https://github.com/apache/iceberg/pull/17322#discussion_r3635484746
##########
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:
There are cases where the null and NaN counts can be null.
- `nan_value_count` is only applicable for float and double fields. other
types won't have `Nan` count.
- `null_value_count` is omitted in the type for required fields.
But maybe you are suggesting we should construct the `FieldStatsStruct` this
way?
```
FieldStatsStruct<String> stats = new FieldStatsStruct<>(STRING_STATS);
stats.fromFieldMetrics(new FieldMetrics<>(100, 28, 2, "a", "z"));
```
--
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]