Repository navigation
[branch-54] Expand scalar async UDF results to the batch row count (#25828) - #27372
Merged
Merged
Conversation
## Which issue does this PR close? - Closes apache#25875 ## Rationale for this change When an async UDF returns a `ColumnarValue::Scalar` (e.g. all arguments are literals), queries on more than one row fail with `all columns in a record batch must have the same length`. ## What changes are included in this PR? `AsyncFuncExpr::invoke_with_args` expands each result to its chunk's row count via `into_array_of_size`, instead of turning a scalar into a 1-row array. ## What is the testing strategy for this PR? Added `test_async_udf_with_scalar_result` in `user_defined_async_scalar_functions.rs`. It fails without the fix. ## Are there any user-facing changes? No. (cherry picked from commit 1aed7dc)
hareshkh
approved these changes
Nov 12, 2026
hareshkh
left a comment
Contributor
There was a problem hiding this comment.
Honest backport of the original PR
9 of 24 tasks
alamb
enabled auto-merge (squash)
November 12, 2026 21:31
alamb
reviewed
Nov 12, 2026
alamb
left a comment
Contributor
There was a problem hiding this comment.
Thanks @kamilk-pal and @hareshkh
alamb
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
branch-5454.2.0(minor/patch) Release #23805