Fokko commented on code in PR #1045:
URL: https://github.com/apache/iceberg-rust/pull/1045#discussion_r1982961967


##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -1336,4 +1347,138 @@ message schema {
                 .expect("Some ProjectionMask");
         assert_eq!(mask, ProjectionMask::leaves(&parquet_schema, vec![0]));
     }
+
+    #[tokio::test]
+    async fn test_kleene_logic_or_behaviour() {
+        // a IS NULL OR a = 'foo'
+        let predicate = Reference::new("a")
+            .is_null()
+            .or(Reference::new("a").equal_to(Datum::string("foo")));
+
+        // Table data: [NULL, "foo", "bar"]
+        let data_for_col_a = vec![None, Some("foo".to_string()), 
Some("bar".to_string())];
+
+        // Expected: [NULL, "foo"].

Review Comment:
   With the regular `or`, it drops the `null`:
   ```
   assertion `left == right` failed
     left: [Some("foo")]
    right: [None, Some("foo")]
   
   Left:  [Some("foo")]
   Right: [None, Some("foo")]
   ```



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