Skip to content

Commit af19af5

Browse files
committed
test: cover array_first list input coercions
1 parent e25a373 commit af19af5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

datafusion/sqllogictest/test_files/array/array_first.slt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ SELECT array_first(arrow_cast([1, 2, 3, 4], 'LargeList(Int32)'), x -> x > 2);
105105
----
106106
3
107107

108+
# other list representations are coerced during planning
109+
query III
110+
SELECT
111+
array_first(arrow_cast([1, 2, 3, 4], 'FixedSizeList(4, Int32)'), x -> x > 2),
112+
array_first(arrow_cast([1, 2, 3, 4], 'ListView(Int32)'), x -> x > 2),
113+
array_first(arrow_cast([1, 2, 3, 4], 'LargeListView(Int32)'), x -> x > 2);
114+
----
115+
3 3 3
116+
108117
# alias array_first/list_first work
109118
query I
110119
SELECT list_first([1, 2, 3, 4], x -> x > 2);

0 commit comments

Comments
 (0)