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


##########
datafusion/ffi/integration-tests/tests/cases/udf.rs:
##########
@@ -103,6 +104,21 @@ mod tests {
         
assert!(foreign_func.preserves_lex_ordering(std::slice::from_ref(&preserves))?);
         assert!(!foreign_func.preserves_lex_ordering(&[preserves, 
does_not_preserve])?);
 
+        let ascending = ExprProperties::new_unknown()
+            .with_order(SortProperties::Ordered(SortOptions {
+                descending: false,
+                nulls_first: true,
+            }))
+            .with_preserves_lex_ordering(true);
+        assert_eq!(
+            foreign_func.output_ordering(&[ascending])?,
+            SortProperties::Ordered(SortOptions {
+                descending: true,
+                nulls_first: true,
+            })
+        );
+        assert!(foreign_func.output_ordering(&[]).is_err());

Review Comment:
   Could we assert that the error contains `output_ordering requires exactly 
one input` to verify that the producer's error survives FFI transport? The same 
applies to the unit test.



##########
datafusion/ffi/integration-tests/tests/cases/udf.rs:
##########
@@ -103,6 +104,21 @@ mod tests {
         
assert!(foreign_func.preserves_lex_ordering(std::slice::from_ref(&preserves))?);
         assert!(!foreign_func.preserves_lex_ordering(&[preserves, 
does_not_preserve])?);
 
+        let ascending = ExprProperties::new_unknown()

Review Comment:
   Consider adding a forced-foreign LogFunc regression test to verify interval 
bounds and argument order. With ascending x bounded to [2, 10], assert 
ascending for log(2, x) and Unordered for log(0.5, x).



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