huaxingao commented on code in PR #15070:
URL: https://github.com/apache/iceberg/pull/15070#discussion_r2702740234
##########
api/src/main/java/org/apache/iceberg/expressions/MaxAggregate.java:
##########
@@ -40,6 +40,12 @@ protected MaxAggregate(BoundTerm<T> term) {
@Override
protected boolean hasValue(DataFile file) {
+ // If nanValueCounts > 0 , it could be -NaN or NaN and hence we cant
conclude the max value is
+ // NaN
+ Long nanCount = safeGet(file.nanValueCounts(), fieldId);
+ if (nanCount != null && nanCount > 0) {
+ return false;
+ }
Review Comment:
nit: Can we extract a small helper (e.g., hasNaNs) to keep this logic in one
place?
--
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]