hareshkh commented on code in PR #25828:
URL: https://github.com/apache/datafusion/pull/25828#discussion_r4122620001
##########
datafusion/core/tests/user_defined/user_defined_async_scalar_functions.rs:
##########
@@ -89,6 +89,35 @@ async fn test_async_udf_with_non_modular_batch_size() ->
Result<()> {
Ok(())
}
+// An async UDF may return a scalar when all of its arguments are scalars. The
+// scalar applies to every row, so it must be expanded to the number of rows in
+// each chunk rather than to a single row.
+#[tokio::test]
+async fn test_async_udf_with_scalar_result() -> Result<()> {
Review Comment:
Without the fix fails with:
```
Error: ArrowError(InvalidArgumentError("all columns in a record batch must
have the same length"), Some(""))
```
--
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]