kosiew commented on code in PR #27504:
URL: https://github.com/apache/datafusion/pull/27504#discussion_r4611310648


##########
datafusion/sqllogictest/test_files/array/array_slice.slt:
##########
@@ -335,6 +335,27 @@ select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 
'LargeList(Int64)'), 2,
 ----
 [2] [e]
 
+# array_slice scalar function #26 (with a stride that overflows the offset 
type)
+query ??
+select array_slice(make_array(1, 2, 3, 4, 5), 2, 2, 2147483647), 
list_slice(make_array('h', 'e', 'l', 'l', 'o'), 2, 4, 2147483647);
+----
+[2] [e]
+
+query ??
+select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'LargeList(Int64)'), 
2, 2, 9223372036854775807), make_array(1, 2, 3, 4, 5)[2:2:2147483647];
+----
+[2] [2]
+
+query ??
+select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'ListView(Int64)'), 
2, 2, 2147483647), array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 
'LargeListView(Int64)'), 2, 2, 9223372036854775807);
+----
+[2] [2]
+
+query ?
+select array_slice(a, 2, 2, s) from (values (make_array(1, 2, 3, 4, 5), 
2147483647)) t(a, s);

Review Comment:
   Consider an array-level test with ordinary, overflowing, then ordinary 
strides across multiple rows. This would verify index-buffer reuse and nonzero 
row offsets.



-- 
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]

Reply via email to