timsaucer opened a new issue, #19947:
URL: https://github.com/apache/datafusion/issues/19947
### Describe the bug
When you have a ListArray and the inner field is non-nullable, `array_sort`
generates an error in 51.0.0. See below for steps to reproduce.
### To Reproduce
The following generates an error:
```sql
select array_sort(arrow_cast(make_array(1, 3, 5, -5), 'List(non-null
Int32)'));
```
> DataFusion error: Internal("Assertion failed: result_data_type ==
*expected_type: Function 'array_sort' returned value of type 'List(Field {
data_type: Int32 })' while the following type was promised at planning time and
expected: 'List(Field { data_type: Int32, nullable: true })'")
### Expected behavior
You cannot do the above sql with 50.0.0 but I did test by manually creating
and registering a record batch that has a list array with inner non-nullable
field. It passes in 50.0.0 and fails in 51.0.0.
### Additional context
I believe this was introduced in
https://github.com/apache/datafusion/pull/17657
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]