ClickHouse/dbms/tests/queries/0_stateless/00979_set_index_not.sql
Nikita Vasilev b242c6ec79 fix test
2019-08-01 22:51:51 +03:00

16 lines
527 B
SQL

SET allow_experimental_data_skipping_indices = 1;
DROP TABLE IF EXISTS test.set_index_not;
CREATE TABLE test.set_index_not
( name String, status Enum8('alive' = 0, 'rip' = 1),
INDEX idx_status status TYPE set(2) GRANULARITY 1
)
ENGINE = MergeTree() ORDER BY name SETTINGS index_granularity = 8192;
insert into test.set_index_not values ('Jon','alive'),('Ramsey','rip');
select * from test.set_index_not where status!='rip';
select * from test.set_index_not where NOT (status ='rip');
DROP TABLE test.set_index_not;