alamb commented on code in PR #8121:
URL: https://github.com/apache/arrow-datafusion/pull/8121#discussion_r1413070868


##########
datafusion/sqllogictest/test_files/array.slt:
##########
@@ -2371,36 +2371,66 @@ select array_length(make_array(1, 2, 3, 4, 5)), 
array_length(make_array(1, 2, 3)
 ----
 5 3 3
 
+query III
+select array_length(arrow_cast(make_array(1, 2, 3, 4, 5), 
'LargeList(Int64)')), array_length(arrow_cast(make_array(1, 2, 3), 
'LargeList(Int64)')), array_length(arrow_cast(make_array([1, 2], [3, 4], [5, 
6]), 'LargeList(List(Int64))'));
+----
+5 3 3
+
 # array_length scalar function #2
 query III
 select array_length(make_array(1, 2, 3, 4, 5), 1), array_length(make_array(1, 
2, 3), 1), array_length(make_array([1, 2], [3, 4], [5, 6]), 1);
 ----
 5 3 3
 
+query III
+select array_length(arrow_cast(make_array(1, 2, 3, 4, 5), 'LargeList(Int64)'), 
1), array_length(arrow_cast(make_array(1, 2, 3), 'LargeList(Int64)'), 1), 
array_length(arrow_cast(make_array([1, 2], [3, 4], [5, 6]), 
'LargeList(List(Int64))'), 1);
+----
+5 3 3
+
 # array_length scalar function #3
 query III
 select array_length(make_array(1, 2, 3, 4, 5), 2), array_length(make_array(1, 
2, 3), 2), array_length(make_array([1, 2], [3, 4], [5, 6]), 2);
 ----
 NULL NULL 2
 
+query III
+select array_length(arrow_cast(make_array(1, 2, 3, 4, 5), 'LargeList(Int64)'), 
2), array_length(arrow_cast(make_array(1, 2, 3), 'LargeList(Int64)'), 2), 
array_length(arrow_cast(make_array([1, 2], [3, 4], [5, 6]), 
'LargeList(List(Int64))'), 2);
+----
+NULL NULL 2
+
 # array_length scalar function #4
 query II
 select array_length(array_repeat(array_repeat(array_repeat(3, 5), 2), 3), 1), 
array_length(array_repeat(array_repeat(array_repeat(3, 5), 2), 3), 2);
 ----
 3 2
 
+query II
+select array_length(arrow_cast(array_repeat(array_repeat(array_repeat(3, 5), 
2), 3), 'LargeList(List(List(Int64)))'), 1), 
array_length(arrow_cast(array_repeat(array_repeat(array_repeat(3, 5), 2), 3), 
'LargeList(List(List(Int64)))'), 2);

Review Comment:
   Could it be possible to add a test that tries to cast `LargeList(List)` as a 
follow on PR? It would, of course, error initially, but then when we upgraded 
arrow to a version that did support that cast, we would have the test coverage



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to