Files
email-tracker/external/duckdb/test/fuzzer/sqlsmith/nullif_map.test
2025-10-24 19:21:19 -05:00

26 lines
499 B
SQL

# name: test/fuzzer/sqlsmith/nullif_map.test
# description: Test nullif on maps
# group: [sqlsmith]
statement ok
PRAGMA enable_verification
statement ok
CREATE TABLE tbl(map MAP(VARCHAR, VARCHAR));;
statement ok
INSERT INTO tbl VALUES(MAP([], []));
statement ok
INSERT INTO tbl VALUES(MAP(['key1', 'key2'], ['🦆🦆🦆🦆🦆🦆', 'goose']));
statement ok
INSERT INTO tbl VALUES(NULL);
query I
SELECT nullif(ref_2."map", ref_2."map") FROM tbl AS ref_2 ORDER BY rowid;
----
NULL
NULL
NULL