Skip to content

Commit 9c52484

Browse files
committed
test: improve array_first SQL coverage
1 parent 02a902c commit 9c52484

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

datafusion/sqllogictest/test_files/array/array_first.slt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ SELECT list_first([1, 2, 3, 4], x -> x > 2);
120120
----
121121
3
122122

123+
# Predicate result must be boolean
124+
query error predicate must return boolean array, got Int64
125+
SELECT array_first([1, 2, 3], x -> x + 1);
126+
127+
query error DataFusion error:
128+
SELECT array_first([1, 2, 3]);
129+
130+
query error DataFusion error:
131+
SELECT array_first(1, x -> x > 0);
132+
123133
statement ok
124134
drop table t;
125135

0 commit comments

Comments
 (0)