mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
26 lines
568 B
MySQL
26 lines
568 B
MySQL
|
|
||
|
DROP TABLE IF EXISTS t_constant_index;
|
||
|
|
||
|
CREATE TABLE t_constant_index
|
||
|
(
|
||
|
id UInt64,
|
||
|
INDEX t_constant_index 'foo' TYPE set(2) GRANULARITY 1
|
||
|
) ENGINE = MergeTree
|
||
|
ORDER BY id; -- { serverError INCORRECT_QUERY }
|
||
|
|
||
|
CREATE TABLE t_constant_index
|
||
|
(
|
||
|
id UInt64,
|
||
|
INDEX t_constant_index id + rand() TYPE set(2) GRANULARITY 1
|
||
|
) ENGINE = MergeTree
|
||
|
ORDER BY id; -- { serverError BAD_ARGUMENTS }
|
||
|
|
||
|
CREATE TABLE t_constant_index
|
||
|
(
|
||
|
id UInt64,
|
||
|
INDEX t_constant_index id * 2 TYPE set(2) GRANULARITY 1
|
||
|
) ENGINE = MergeTree
|
||
|
ORDER BY id;
|
||
|
|
||
|
DROP TABLE t_constant_index;
|