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
array_to_string function panic's when running a query on data that has dictionary data type. To fix the panic, array_to_string needs to support dictionary type
To Reproduce
Use DataFusion CLI:
# in dir datafusion/datafusion-cli
$ cargo build
$ ./target/debug/datafusion-cli
>SELECT array_to_string(array_agg(column2),',') FROM (SELECT column2 FROM table1);
thread 'main' panicked at .../datafusion/datafusion/functions-array/src/string.rs:298:17:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected behavior
>SELECT array_to_string(array_agg(column2),',') FROM (SELECT column2 FROM table1);
+------------------------------------------------------+
| array_to_string(ARRAY_AGG(table2.column2),Utf8(",")) |
+------------------------------------------------------+
| foo,bar |
+------------------------------------------------------+
Additional context
Here are the data types that array_to_string currently supports:
Describe the bug
array_to_string
function panic's when running a query on data that has dictionary data type. To fix the panic,array_to_string
needs to support dictionary typeTo Reproduce
# in dir datafusion/datafusion-cli $ cargo build $ ./target/debug/datafusion-cli
Expected behavior
Additional context
Here are the data types that
array_to_string
currently supports:datafusion/datafusion/functions-array/src/string.rs
Lines 63 to 101 in 5912025
instead of panic, it would be better to throw an error
The text was updated successfully, but these errors were encountered: