ClickHouse/tests/queries/0_stateless/01079_new_range_reader_segfault.sql

12 lines
347 B
MySQL
Raw Normal View History

2020-02-13 21:16:40 +00:00
drop table if exists t;
create table t (a Int) engine = MergeTree order by a;
-- some magic to satisfy conditions to run optimizations in MergeTreeRangeReader
insert into t select number < 20 ? 0 : 1 from numbers(50);
2020-02-13 21:16:40 +00:00
alter table t add column s String default 'foo';
select s from t prewhere a != 1 where rand() % 2 = 0 limit 1;
drop table t;