ClickHouse/tests/queries/0_stateless/02021_map_has.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
395 B
MySQL
Raw Normal View History

2021-09-29 14:43:35 +00:00
DROP TABLE IF EXISTS test_map;
CREATE TABLE test_map (value Map(String, String)) ENGINE=TinyLog;
SELECT 'Non constant map';
INSERT INTO test_map VALUES ({'K0':'V0'});
SELECT has(value, 'K0') FROM test_map;
SELECT has(value, 'K1') FROM test_map;
SELECT 'Constant map';
SELECT has(map('K0', 'V0'), 'K0') FROM system.one;
SELECT has(map('K0', 'V0'), 'K1') FROM system.one;
DROP TABLE test_map;