ZuoTiJia opened a new issue, #4080:
URL: https://github.com/apache/arrow-datafusion/issues/4080
**Describe the bug**
Use the array_agg function, which results in panic
**To Reproduce**
```
DataFusion CLI v13.0.0
❯ select array_agg([1]);
thread 'thread 'tokio-runtime-workertokio-runtime-workerthread '' panicked
at 'tokio-runtime-worker' panicked at '' panicked at 'called `Result::unwrap()`
on an `Err` value: Internal("Empty iterator passed to
ScalarValue::iter_to_array")called `Result::unwrap()` on an `Err` value:
Internal("Empty iterator passed to ScalarValue::iter_to_array")', ',
.cargo/registry/src/github.com-1ecc6299db9ec823/datafusion-common-13.0.0/src/scalar.rs.cargo/registry/src/github.com-1ecc6299db9ec823/datafusion-common-13.0.0/src/scalar.rs::16081608::thread
'called `Result::unwrap()` on an `Err` value: Internal("Empty iterator passed
to ScalarValue::iter_to_array")1818
', tokio-runtime-worker' panicked at
'.cargo/registry/src/github.com-1ecc6299db9ec823/datafusion-common-13.0.0/src/scalar.rsnote:
run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-workercalled `Result::unwrap()` on an `Err` value:
Internal("Empty iterator passed to ScalarValue::iter_to_array"):1608', :18'
panicked at '
called `Result::unwrap()` on an `Err` value: Internal("Empty iterator passed
to ScalarValue::iter_to_array")
.cargo/registry/src/github.com-1ecc6299db9ec823/datafusion-common-13.0.0/src/scalar.rs',
:.cargo/registry/src/github.com-1ecc6299db9ec823/datafusion-common-13.0.0/src/scalar.rs1608::160818:
18
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an
`Err` value: Internal("Empty iterator passed to ScalarValue::iter_to_array")',
.cargo/registry/src/github.com-1ecc6299db9ec823/datafusion-common-13.0.0/src/scalar.rs:1608:18
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an
`Err` value: Internal("Empty iterator passed to ScalarValue::iter_to_array")',
.cargo/registry/src/github.com-1ecc6299db9ec823/datafusion-common-13.0.0/src/scalar.rs:1608:18
+---------------------+
| ARRAYAGG(List([1])) |
+---------------------+
| [[1]] |
+---------------------+
1 row in set. Query took 0.004 seconds.
❯
```
--
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]