kosiew commented on code in PR #25876:
URL: https://github.com/apache/datafusion/pull/25876#discussion_r4324022667


##########
datafusion/ffi/tests/ffi_udaf.rs:
##########
@@ -82,6 +82,27 @@ mod tests {
         Ok(())
     }
 
+    #[test]
+    fn test_distinct_handling() -> Result<()> {
+        let module = get_module()?;
+
+        let ffi_stddev_func = (module.create_stddev_udaf)();
+        let foreign_stddev_func: Arc<dyn AggregateUDFImpl> = 
(&ffi_stddev_func).into();
+        assert_eq!(
+            foreign_stddev_func.distinct_handling(),
+            DistinctHandling::Unsupported
+        );
+

Review Comment:
   It would be useful to expose `MIN` through the test library and verify that 
foreign `MIN(DISTINCT x)` produces the correct result and an optimized plan 
without DISTINCT or an extra deduplication aggregate. This would cover the 
planner behavior across the actual library boundary, but the existing tests 
already verify the metadata forwarding.



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