added tests [#CLICKHOUSE-3397]

This commit is contained in:
Nikolai Kochetov 2017-11-03 16:54:50 +03:00
parent 1cee62eb0a
commit 2fca796925
4 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,28 @@
date Date
val UInt64
val2 UInt8 DEFAULT 42
val3 UInt8 DEFAULT CAST((val2 + 1) AS UInt8)
val4 UInt64 ALIAS val
-
date Date
val UInt64
val2 UInt8 DEFAULT 42
val3 UInt8 DEFAULT CAST((val2 + 1) AS UInt8)
val4 UInt64 ALIAS val
-
date Date
val UInt64
val2 UInt8
val3 UInt8
-
date Date
val UInt64
val2 UInt8
val3 UInt8
-
1 UInt8
-
1 UInt8
-
number UInt64
-

View File

@ -0,0 +1,17 @@
drop table if exists test.tab;
create table test.tab (date Date, val UInt64, val2 UInt8 default 42, val3 UInt8 default val2 + 1, val4 UInt64 alias val) engine = MergeTree(date, (date, val), 8192);
desc test.tab;
select '-';
desc table test.tab;
select '-';
desc remote('localhost', test.tab);
select '-';
desc table remote('localhost', test.tab);
select '-';
desc (select 1);
select '-';
desc table (select 1);
select '-';
desc (select * from system.numbers);
select '-';

View File

@ -0,0 +1 @@
2017-11-03 42

View File

@ -0,0 +1,5 @@
drop table if exists test.tab;
create table test.tab (date Date, val UInt64) engine = MergeTree(date, (date, val), 8192);
insert into remote('localhost', test.tab) values ('2017-11-03', 42);
select * from test.tab;