aokolnychyi commented on a change in pull request #2495:
URL: https://github.com/apache/iceberg/pull/2495#discussion_r616231093



##########
File path: core/src/main/java/org/apache/iceberg/util/ManifestFileUtil.java
##########
@@ -60,7 +60,7 @@ boolean canContain(Object value) {
       }
 
       if (NaNUtil.isNaN(value)) {
-        return containsNaN;
+        return containsNaN == null ? true : containsNaN;

Review comment:
       I'd consider doing this in the constructor to avoid calling the ternary 
operation in each `canContain`.
   
   ```
   this.containsNaN = summary.containsNaN() == null || summary.containsNaN();
   ```
   
   Then this will also be a one line change. I'll leave this up to you, 
@RussellSpitzer @yyanyy. 




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

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