More sophisticated test. [#CLICKHOUSE-2]

This commit is contained in:
Vitaliy Lyudvichenko 2017-06-06 17:18:23 +03:00
parent cce302588a
commit d4d316dbb8
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@ col3 UInt64 MATERIALIZED col1 + 2
col4 UInt64 ALIAS col1 + 3
10 11
12 13
99
payload String
date Date MATERIALIZED today()
key UInt64 MATERIALIZED 0 * rand()

View File

@ -11,6 +11,11 @@ select * from defaulted_test;
select col3, col4 from defaulted_test;
drop table defaulted_test;
create table defaulted_test (col1 Int8, col2 UInt64 default (SELECT dummy+99 from system.one)) engine=Memory;
insert into defaulted_test (col1) values (0);
select col2 from defaulted_test;
drop table defaulted_test;
create table defaulted_test (payload String, date materialized today(), key materialized 0 * rand()) engine=MergeTree(date, key, 8192);
desc table defaulted_test;
insert into defaulted_test (payload) values ('hello clickhouse');