mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Cover CREATE TABLE AS table/view/live-view/dictionary
This commit is contained in:
parent
1d44977ae2
commit
487a05fae4
29
dbms/tests/queries/0_stateless/01056_create_table_as.sql
Normal file
29
dbms/tests/queries/0_stateless/01056_create_table_as.sql
Normal file
@ -0,0 +1,29 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (key Int) Engine=Memory();
|
||||
CREATE TABLE t2 AS t1;
|
||||
|
||||
-- live view
|
||||
SET allow_experimental_live_view=1;
|
||||
CREATE LIVE VIEW v AS SELECT * FROM t1;
|
||||
CREATE TABLE t3 AS v; -- { serverError 80; }
|
||||
|
||||
-- view
|
||||
CREATE VIEW lv AS SELECT * FROM t1;
|
||||
CREATE TABLE t3 AS lv; -- { serverError 80; }
|
||||
|
||||
-- dictionary
|
||||
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; }
|
Loading…
Reference in New Issue
Block a user