mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-09 07:52:19 +00:00
34 lines
1.2 KiB
SQL
34 lines
1.2 KiB
SQL
DROP TABLE IF EXISTS t_map_lc;
|
|
|
|
CREATE TABLE t_map_lc
|
|
(
|
|
id UInt64,
|
|
t Tuple(m Map(LowCardinality(String), LowCardinality(String)))
|
|
)
|
|
ENGINE = MergeTree ORDER BY id SETTINGS min_bytes_for_wide_part = 0;
|
|
|
|
INSERT INTO t_map_lc SELECT * FROM generateRandom('id UInt64, t Tuple(m Map(LowCardinality(String), LowCardinality(String)))') LIMIT 100000;
|
|
|
|
SELECT count(), FROM t_map_lc WHERE NOT ignore(*, mapKeys(t.m));
|
|
SELECT count(), FROM t_map_lc WHERE NOT ignore(*, t.m.keys);
|
|
SELECT count(), FROM t_map_lc WHERE NOT ignore(*, t.m.values);
|
|
SELECT * FROM t_map_lc WHERE mapContains(t.m, 'not_existing_key_1337');
|
|
|
|
DROP TABLE t_map_lc;
|
|
|
|
CREATE TABLE t_map_lc
|
|
(
|
|
id UInt64,
|
|
t Tuple(m Map(LowCardinality(String), LowCardinality(String)))
|
|
)
|
|
ENGINE = MergeTree ORDER BY id SETTINGS min_bytes_for_wide_part = '10G';
|
|
|
|
INSERT INTO t_map_lc SELECT * FROM generateRandom('id UInt64, t Tuple(m Map(LowCardinality(String), LowCardinality(String)))') LIMIT 100000;
|
|
|
|
SELECT count(), FROM t_map_lc WHERE NOT ignore(*, mapKeys(t.m));
|
|
SELECT count(), FROM t_map_lc WHERE NOT ignore(*, t.m.keys);
|
|
SELECT count(), FROM t_map_lc WHERE NOT ignore(*, t.m.values);
|
|
SELECT * FROM t_map_lc WHERE mapContains(t.m, 'not_existing_key_1337');
|
|
|
|
DROP TABLE t_map_lc;
|