Describe the bug
When having array_distinct on null, the query fails
To Reproduce
Run the following in datafusion-cli
select array_distinct(a) from values ([1, 2, 3]), ([1, 3, 1]), (null) as X(a);
Internal error: UDF returned a different number of rows than expected. Expected: 3, Got: 2.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
Expected behavior
To not fail and return the correct result
Additional context
I'll create PR to fix this week