You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use the lead or lag built in functions and the data type is either a list or struct, you will get a panic with error Exception: Arrow error: Compute error: concat requires input of at least one array
I have root caused this to list_to_array_of_size in datafusion/common/src/scalar/mod.rs where we do not check to see if the arrays we are attempting to concat have any contents, which they will not because in WindowAggState::new() we are calling to_array_of_size(0). These calls work for primitive data, but for list data we need an additional check. I am submitting a PR to resolve the issue.
Describe the bug
When you use the lead or lag built in functions and the data type is either a list or struct, you will get a panic with error
Exception: Arrow error: Compute error: concat requires input of at least one array
I have root caused this to
list_to_array_of_size
indatafusion/common/src/scalar/mod.rs
where we do not check to see if the arrays we are attempting to concat have any contents, which they will not because inWindowAggState::new()
we are callingto_array_of_size(0)
. These calls work for primitive data, but for list data we need an additional check. I am submitting a PR to resolve the issue.To Reproduce
Data file is a simple csv:
Code to reproduce:
Results:
Expected behavior
Expect lag to work on these structures. Here is output from the PR I will put up shortly.
Additional context
This is the root cause for apache/datafusion-python#647
The text was updated successfully, but these errors were encountered: