2020-01-02 22:48:28 +00:00
|
|
|
DROP TABLE IF EXISTS t1;
|
2020-05-13 00:08:07 +00:00
|
|
|
DROP TABLE IF EXISTS t2;
|
|
|
|
DROP TABLE IF EXISTS t3;
|
|
|
|
DROP TABLE IF EXISTS v;
|
|
|
|
DROP TABLE IF EXISTS lv;
|
|
|
|
|
2020-08-21 15:22:54 +00:00
|
|
|
CREATE TABLE t1 (key Int) Engine=Memory;
|
2020-01-02 22:48:28 +00:00
|
|
|
CREATE TABLE t2 AS t1;
|
2020-01-03 08:15:34 +00:00
|
|
|
DROP TABLE t2;
|
2020-08-21 15:22:54 +00:00
|
|
|
CREATE TABLE t2 Engine=Memory AS t1;
|
|
|
|
DROP TABLE t2;
|
|
|
|
CREATE TABLE t2 AS t1 Engine=Memory;
|
|
|
|
DROP TABLE t2;
|
|
|
|
CREATE TABLE t3 AS numbers(10);
|
|
|
|
DROP TABLE t3;
|
2020-01-02 22:48:28 +00:00
|
|
|
|
|
|
|
-- live view
|
|
|
|
SET allow_experimental_live_view=1;
|
2020-01-03 10:34:24 +00:00
|
|
|
CREATE LIVE VIEW lv AS SELECT * FROM t1;
|
|
|
|
CREATE TABLE t3 AS lv; -- { serverError 80; }
|
|
|
|
DROP TABLE lv;
|
2020-01-02 22:48:28 +00:00
|
|
|
|
|
|
|
-- view
|
2020-01-03 10:34:24 +00:00
|
|
|
CREATE VIEW v AS SELECT * FROM t1;
|
|
|
|
CREATE TABLE t3 AS v; -- { serverError 80; }
|
|
|
|
DROP TABLE v;
|
2020-01-02 22:48:28 +00:00
|
|
|
|
|
|
|
-- dictionary
|
2020-04-10 07:35:13 +00:00
|
|
|
DROP DICTIONARY IF EXISTS dict;
|
2020-01-02 22:48:28 +00:00
|
|
|
DROP DATABASE if exists test_01056_dict_data;
|
|
|
|
CREATE DATABASE test_01056_dict_data;
|
|
|
|
CREATE TABLE test_01056_dict_data.dict_data (key Int, value UInt16) Engine=Memory();
|
|
|
|
CREATE DICTIONARY dict
|
|
|
|
(
|
|
|
|
`key` UInt64,
|
|
|
|
`value` UInt16
|
|
|
|
)
|
|
|
|
PRIMARY KEY key
|
|
|
|
SOURCE(CLICKHOUSE(
|
|
|
|
HOST '127.0.0.1' PORT 9000
|
|
|
|
TABLE 'dict_data' DB 'test_01056_dict_data' USER 'default' PASSWORD ''))
|
|
|
|
LIFETIME(MIN 0 MAX 0)
|
|
|
|
LAYOUT(SPARSE_HASHED());
|
|
|
|
CREATE TABLE t3 AS dict; -- { serverError 80; }
|
2020-05-13 00:08:07 +00:00
|
|
|
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t3;
|
2020-11-11 15:29:36 +00:00
|
|
|
DROP DICTIONARY dict;
|
|
|
|
DROP TABLE test_01056_dict_data.dict_data;
|
|
|
|
|
|
|
|
DROP DATABASE test_01056_dict_data;
|