mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Better test
This commit is contained in:
parent
9f19a25fb8
commit
f3e3df4593
@ -1,6 +1,10 @@
|
||||
[8,9,10]
|
||||
['a','b','c']
|
||||
CREATE TABLE default.table_for_rename_nested (`date` Date, `key` UInt64, `n.x` Array(UInt32), `n.y` Array(String), `value1` String) ENGINE = MergeTree() PARTITION BY date ORDER BY key SETTINGS index_granularity = 8192
|
||||
CREATE TABLE default.table_for_rename_nested (`date` Date, `key` UInt64, `n.renamed_x` Array(UInt32), `n.renamed_y` Array(String), `value1` String) ENGINE = MergeTree() PARTITION BY date ORDER BY key SETTINGS index_granularity = 8192
|
||||
CREATE TABLE default.table_for_rename_nested (`date` Date, `key` UInt64, `n.x` Array(UInt32), `n.y` Array(String), `value1` LowCardinality(String)) ENGINE = MergeTree() PARTITION BY date ORDER BY key SETTINGS index_granularity = 8192
|
||||
CREATE TABLE default.table_for_rename_nested (`date` Date, `key` UInt64, `n.renamed_x` Array(UInt32), `n.renamed_y` Array(String), `value1` LowCardinality(String)) ENGINE = MergeTree() PARTITION BY date ORDER BY key SETTINGS index_granularity = 8192
|
||||
7 [8,9,10]
|
||||
7 ['a','b','c']
|
||||
7
|
||||
CREATE TABLE default.table_for_rename_nested (`date` Date, `key` UInt64, `n.renamed_x` Array(UInt32), `n.renamed_y` Array(String), `renamed_value1` LowCardinality(String)) ENGINE = MergeTree() PARTITION BY date ORDER BY key SETTINGS index_granularity = 8192
|
||||
date key n.renamed_x n.renamed_y renamed_value1
|
||||
2019-10-01 7 [8,9,10] ['a','b','c'] 7
|
||||
|
@ -4,7 +4,7 @@ CREATE TABLE table_for_rename_nested
|
||||
date Date,
|
||||
key UInt64,
|
||||
n Nested(x UInt32, y String),
|
||||
value1 String
|
||||
value1 LowCardinality(String) -- column with several files
|
||||
)
|
||||
ENGINE = MergeTree()
|
||||
PARTITION BY date
|
||||
@ -30,5 +30,13 @@ ALTER TABLE table_for_rename_nested RENAME COLUMN n.renamed_x TO not_nested_x; -
|
||||
-- Currently not implemented
|
||||
ALTER TABLE table_for_rename_nested RENAME COLUMN n TO renamed_n; --{serverError 48}
|
||||
|
||||
ALTER TABLE table_for_rename_nested RENAME COLUMN value1 TO renamed_value1;
|
||||
|
||||
SELECT renamed_value1 FROM table_for_rename_nested WHERE key = 7;
|
||||
|
||||
SHOW CREATE TABLE table_for_rename_nested;
|
||||
|
||||
SELECT * FROM table_for_rename_nested WHERE key = 7 FORMAT TSVWithNames;
|
||||
|
||||
DROP TABLE IF EXISTS table_for_rename_nested;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user