Skip to content

Commit

Permalink
add pure sql reproduction
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Sep 13, 2024
1 parent 83bc056 commit b59daed
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions datafusion/sqllogictest/test_files/array.slt
Original file line number Diff line number Diff line change
Expand Up @@ -7086,6 +7086,19 @@ select [1,2,3]::int[], [['1']]::int[][], arrow_typeof([]::text[]);
----
[1, 2, 3] [[1]] List(Field { name: "item", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })

# test empty arrays return length
statement ok
create table values_all_empty(items int[]);

statement ok
insert into values_all_empty (items) (select [] as c from (select unnest(generate_series(1, 3))));

query B
select array_has(items, 1) from values_all_empty;
----
false
false
false

### Delete tables

Expand Down Expand Up @@ -7259,3 +7272,6 @@ drop table fixed_size_arrays_values_without_nulls;

statement ok
drop table test_create_array_table;

statement ok
drop table values_all_empty;

0 comments on commit b59daed

Please sign in to comment.