mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Test added
This commit is contained in:
parent
6b39253b71
commit
b0eabb690b
@ -0,0 +1 @@
|
|||||||
|
1 10
|
@ -0,0 +1,46 @@
|
|||||||
|
SET send_logs_level = 'none';
|
||||||
|
|
||||||
|
DROP DATABASE IF EXISTS database_for_dict;
|
||||||
|
|
||||||
|
CREATE DATABASE database_for_dict Engine = Ordinary;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS database_for_dict.table_for_dict;
|
||||||
|
|
||||||
|
CREATE TABLE database_for_dict.table_for_dict
|
||||||
|
(
|
||||||
|
key_column UInt64,
|
||||||
|
second_column UInt8,
|
||||||
|
third_column String
|
||||||
|
)
|
||||||
|
ENGINE = MergeTree()
|
||||||
|
ORDER BY key_column;
|
||||||
|
|
||||||
|
INSERT INTO database_for_dict.table_for_dict VALUES (1, 100, 'Hello world');
|
||||||
|
|
||||||
|
DROP DATABASE IF EXISTS ordinary_db;
|
||||||
|
|
||||||
|
CREATE DATABASE ordinary_db ENGINE = Ordinary;
|
||||||
|
|
||||||
|
DROP DICTIONARY IF EXISTS ordinary_db.dict1;
|
||||||
|
|
||||||
|
CREATE DICTIONARY ordinary_db.dict1
|
||||||
|
(
|
||||||
|
key_column UInt64 DEFAULT 0,
|
||||||
|
second_column UInt8 DEFAULT 1,
|
||||||
|
third_column String DEFAULT 'qqq'
|
||||||
|
)
|
||||||
|
PRIMARY KEY key_column
|
||||||
|
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'table_for_dict' PASSWORD '' DB 'database_for_dict'))
|
||||||
|
LIFETIME(MIN 1 MAX 10)
|
||||||
|
LAYOUT(FLAT());
|
||||||
|
|
||||||
|
SELECT lifetime_min, lifetime_max FROM system.dictionaries WHERE name = 'dict1';
|
||||||
|
|
||||||
|
DROP DICTIONARY IF EXISTS ordinary_db.dict1;
|
||||||
|
|
||||||
|
DROP DATABASE IF EXISTS ordinary_db;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS database_for_dict.table_for_dict;
|
||||||
|
|
||||||
|
DROP DATABASE IF EXISTS database_for_dict;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user