kumarUjjawal commented on code in PR #22279:
URL: https://github.com/apache/datafusion/pull/22279#discussion_r3256708000
##########
datafusion/sqllogictest/test_files/array/array_length.slt:
##########
Review Comment:
Let's add more tests:
```
# array_length scalar function #5b LargeList empty dimension
query II
select array_length(arrow_cast(make_array(), 'LargeList(Int64)')),
array_length(arrow_cast(make_array(), 'LargeList(Int64)'), 1)
----
NULL NULL
# array_length scalar function #5c empty inner dimension (was 0, now NULL)
query II
select array_length(make_array(make_array()), 2),
array_length(make_array(make_array(make_array())), 3)
----
NULL NULL
# list_length alias empty dimension
query II
select list_length(make_array()), list_length(make_array(), 1)
----
NULL NULL
# array_length over a column with an empty-array row
query ?II
select arr, array_length(arr), array_length(arr, 1)
from (values (make_array(1,2,3)),
(arrow_cast(make_array(), 'List(Int64)')),
(NULL::int[])) t(arr)
----
[1, 2, 3] 3 3
[] NULL NULL
NULL NULL NULL
```
--
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]