sdd commented on code in PR #367:
URL: https://github.com/apache/iceberg-rust/pull/367#discussion_r1597949796


##########
crates/iceberg/src/expr/visitors/manifest_evaluator.rs:
##########
@@ -103,98 +106,245 @@ impl BoundPredicateVisitor for ManifestFilterVisitor<'_> 
{
         reference: &BoundReference,
         _predicate: &BoundPredicate,
     ) -> crate::Result<bool> {
-        todo!()
+        let field: &FieldSummary = self.field_summary_for_reference(reference);
+
+        // contains_null encodes whether at least one partition value is null,
+        // lowerBound is null if all partition values are null
+        if self.are_all_null(field, &reference.field().field_type) {
+            ROWS_CANNOT_MATCH
+        } else {
+            ROWS_MIGHT_MATCH
+        }
     }
 
+    #[allow(clippy::bool_comparison)]
     fn is_nan(
         &mut self,
         reference: &BoundReference,
         _predicate: &BoundPredicate,
     ) -> crate::Result<bool> {
-        Ok(self
-            .field_summary_for_reference(reference)
-            .contains_nan
-            .is_some())
+        let field: &FieldSummary = self.field_summary_for_reference(reference);
+        if field.contains_nan.is_some_and(|x| x == false) {

Review Comment:
   Generally this project's style is to avoid having to disable any clippy 
lints.
   
   You could achieve this here (and similarly in `not_nan` by refactoring this 
slightly:
   
   ```rust
   if let Some(contains_nan) = field.contains_nan {
       if !contains_nan {
           return ROWS_CANNOT_MATCH;
       }
   }
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to