alamb opened a new issue, #9773:
URL: https://github.com/apache/arrow-datafusion/issues/9773

   ### Describe the bug
   
   `struct` works fine if all arguments are scalars, or all arguments are 
arrays, but panic's if some arguments are scalars and some are arrays
   
   
   ### To Reproduce
   
   ❯ create table t(x int) as values (1), (2), (3);
   0 rows in set. Query took 0.014 seconds.
   
   ❯ select struct(x, 25) from t;
   thread 'main' panicked at 
/Users/andrewlamb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-array-51.0.0/src/array/struct_array.rs:90:46:
   called `Result::unwrap()` on an `Err` value: InvalidArgumentError("Incorrect 
array length for StructArray field \"c1\", expected 3 got 1")
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   ```
   
   ### Expected behavior
   
   The query should not panic and should return three rows
   
   ### Additional context
   
   When reviewing https://github.com/apache/arrow-datafusion/pull/9743 (which 
is awesome) I wrote up a test case in terms of `struct` and it actually panic'd 
on me
   
   


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

Reply via email to