NikitaMatskevich commented on code in PR #5724:
URL: https://github.com/apache/datafusion-comet/pull/5724#discussion_r3957723567


##########
native/core/src/execution/operators/iceberg_write.rs:
##########
@@ -804,6 +947,107 @@ mod tests {
         assert_eq!(props.created_by(), "Apache Iceberg 1.7.1 (Comet 0.16.0)");
     }
 
+    #[test]
+    fn enables_bloom_filters_only_for_configured_columns() {
+        let mut settings = base_settings();
+        settings.bloom_filter_enabled_columns = vec![
+            "id".to_string(),
+            "tags.list.element".to_string(),
+            "attrs.key_value.value".to_string(),
+        ];
+        let props = build_writer_properties(&settings).unwrap();
+        assert!(props
+            .bloom_filter_properties(&parquet_column_path("id"))
+            .is_some());
+        assert!(props
+            .bloom_filter_properties(&parquet_column_path("tags.list.element"))
+            .is_some());
+        assert!(props
+            
.bloom_filter_properties(&parquet_column_path("attrs.key_value.value"))
+            .is_some());
+        assert!(props
+            .bloom_filter_properties(&parquet_column_path("other"))
+            .is_none());
+    }
+
+    #[test]
+    fn bloom_filter_defaults_match_iceberg() {
+        // Iceberg's documented write-property defaults:
+        // 
https://iceberg.apache.org/docs/latest/configuration/#write-properties
+        let mut settings = base_settings();
+        settings.bloom_filter_enabled_columns = vec!["id".to_string()];
+        let props = build_writer_properties(&settings).unwrap();
+        let bloom = props.bloom_filter_properties(&"id".into()).unwrap();
+        assert_eq!(bloom.fpp, ICEBERG_DEFAULT_BLOOM_FILTER_FPP);
+        assert_eq!(
+            parquet_rs_bloom_filter_bytes(bloom.ndv, bloom.fpp),

Review Comment:
   My bad, Codex did not re-run the tests after rebase, the fix was merged 
here: [fix: use Parquet 59 bloom filter 
APIs](https://github.com/apache/datafusion-comet/pull/5724/commits/709a3604d742424052de9c60879b414a79cd5ff4)



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

Reply via email to