2021-09-12 12:35:27 +00:00
|
|
|
-- Tags: no-parallel
|
|
|
|
|
2021-04-03 10:58:11 +00:00
|
|
|
DROP DATABASE IF EXISTS 01780_db;
|
|
|
|
CREATE DATABASE 01780_db;
|
|
|
|
|
2021-04-01 21:55:48 +00:00
|
|
|
DROP DICTIONARY IF EXISTS dict1;
|
|
|
|
CREATE DICTIONARY dict1
|
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value String
|
|
|
|
)
|
|
|
|
PRIMARY KEY id
|
|
|
|
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 TABLE 'dict1'))
|
|
|
|
LAYOUT(DIRECT());
|
|
|
|
|
|
|
|
SELECT * FROM dict1; --{serverError 36}
|
|
|
|
|
|
|
|
DROP DICTIONARY dict1;
|
|
|
|
|
|
|
|
DROP DICTIONARY IF EXISTS dict2;
|
2021-04-02 21:39:13 +00:00
|
|
|
CREATE DICTIONARY 01780_db.dict2
|
2021-04-01 21:55:48 +00:00
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value String
|
|
|
|
)
|
|
|
|
PRIMARY KEY id
|
2021-04-02 21:39:13 +00:00
|
|
|
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 DATABASE '01780_db' TABLE 'dict2'))
|
2021-04-01 21:55:48 +00:00
|
|
|
LAYOUT(DIRECT());
|
|
|
|
|
2021-04-02 21:39:13 +00:00
|
|
|
SELECT * FROM 01780_db.dict2; --{serverError 36}
|
|
|
|
DROP DICTIONARY 01780_db.dict2;
|
2021-04-01 21:55:48 +00:00
|
|
|
|
2021-04-02 21:39:13 +00:00
|
|
|
DROP TABLE IF EXISTS 01780_db.dict3_source;
|
2021-04-01 21:55:48 +00:00
|
|
|
CREATE TABLE 01780_db.dict3_source
|
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value String
|
|
|
|
) ENGINE = TinyLog;
|
|
|
|
|
|
|
|
INSERT INTO 01780_db.dict3_source VALUES (1, '1'), (2, '2'), (3, '3');
|
|
|
|
|
|
|
|
CREATE DICTIONARY 01780_db.dict3
|
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value String
|
|
|
|
)
|
|
|
|
PRIMARY KEY id
|
|
|
|
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 TABLE 'dict3_source' DATABASE '01780_db'))
|
|
|
|
LAYOUT(DIRECT());
|
|
|
|
|
|
|
|
SELECT * FROM 01780_db.dict3;
|
|
|
|
|
|
|
|
DROP DICTIONARY 01780_db.dict3;
|
2021-04-03 10:58:11 +00:00
|
|
|
|
|
|
|
DROP DATABASE 01780_db;
|