Skip to content

Commit defabd2

Browse files
committed
chore: Add tests in slt
1 parent 6859bb3 commit defabd2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

datafusion/sqllogictest/test_files/array.slt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,14 @@ select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'LargeList(Int64)'), 0,
19651965
----
19661966
[1, 2, 3, 4, 5] [h, e, l, l, o]
19671967

1968+
# TODO: Enable once arrow_cast supports ListView types.
1969+
# Expected output (once supported):
1970+
# ----
1971+
# [1, 2, 3, 4, 5] [h, e, l, l, o]
1972+
query error DataFusion error: Execution error: Unsupported type 'ListView(Int64)'. Must be a supported arrow type name such as 'Int32' or 'Timestamp(ns)'. Error unknown token: ListView
1973+
select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'ListView(Int64)'), 0, 6),
1974+
array_slice(arrow_cast(make_array('h', 'e', 'l', 'l', 'o'), 'ListView(Utf8)'), 0, 5);
1975+
19681976
query ??
19691977
select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'FixedSizeList(5, Int64)'), 0, 6),
19701978
array_slice(arrow_cast(make_array('h', 'e', 'l', 'l', 'o'), 'FixedSizeList(5, Utf8)'), 0, 5);
@@ -2004,6 +2012,14 @@ select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'LargeList(Int64)'), 2,
20042012
----
20052013
[2, 3, 4, 5] [l, l, o]
20062014

2015+
# TODO: Enable once arrow_cast supports LargeListView types.
2016+
# Expected output (once supported):
2017+
# ----
2018+
# [2, 3, 4, 5] [l, l, o]
2019+
query error DataFusion error: Execution error: Unsupported type 'LargeListView(Int64)'. Must be a supported arrow type name such as 'Int32' or 'Timestamp(ns)'. Error unknown token: LargeListView
2020+
select array_slice(arrow_cast(make_array(1, 2, 3, 4, 5), 'LargeListView(Int64)'), 2, 6),
2021+
array_slice(arrow_cast(make_array('h', 'e', 'l', 'l', 'o'), 'LargeListView(Utf8)'), 3, 7);
2022+
20072023
# array_slice scalar function #6 (with positive indexes; nested array)
20082024
query ?
20092025
select array_slice(make_array(make_array(1, 2, 3, 4, 5), make_array(6, 7, 8, 9, 10)), 1, 1);

0 commit comments

Comments
 (0)