mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
13 lines
371 B
MySQL
13 lines
371 B
MySQL
|
DROP TABLE IF EXISTS t_map_contains;
|
||
|
|
||
|
CREATE TABLE t_map_contains (m Map(String, UInt32)) ENGINE = Memory;
|
||
|
|
||
|
INSERT INTO t_map_contains VALUES (map('a', 1, 'b', 2)), (map('c', 3, 'd', 4));
|
||
|
|
||
|
SET optimize_functions_to_subcolumns = 1;
|
||
|
|
||
|
EXPLAIN SYNTAX SELECT mapContains(m, 'a') FROM t_map_contains;
|
||
|
SELECT mapContains(m, 'a') FROM t_map_contains;
|
||
|
|
||
|
DROP TABLE t_map_contains;
|