mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
fix bug
This commit is contained in:
parent
e01fff0e37
commit
3a1e67dc8b
@ -1072,6 +1072,9 @@ CREATE TABLE system.tables
|
||||
`storage_policy` String,
|
||||
`total_rows` Nullable(UInt64),
|
||||
`total_bytes` Nullable(UInt64),
|
||||
`parts` Nullable(UInt64),
|
||||
`active_parts` Nullable(UInt64),
|
||||
`total_marks` Nullable(UInt64),
|
||||
`lifetime_rows` Nullable(UInt64),
|
||||
`lifetime_bytes` Nullable(UInt64),
|
||||
`comment` String,
|
||||
|
@ -1,5 +1,27 @@
|
||||
DROP TABLE IF EXISTS json_columns;
|
||||
-- Check MergeTree declaration in new format
|
||||
CREATE TABLE check_system_tables
|
||||
(
|
||||
name1 UInt8,
|
||||
name2 UInt8,
|
||||
name3 UInt8
|
||||
) ENGINE = MergeTree()
|
||||
ORDER BY name1
|
||||
PARTITION BY name2
|
||||
SAMPLE BY name1
|
||||
SETTINGS min_bytes_for_wide_part = 0, compress_marks=false, compress_primary_key=false;
|
||||
|
||||
CREATE TABLE json_columns (n UInt32, s String) ENGINE = MergeTree order by n;
|
||||
SELECT parts, active_parts,total_marks FROM system.tables WHERE name = 'check_system_tables' AND database = currentDatabase();
|
||||
|
||||
SELECT * FROM json_columns FORMAT JSONColumns;
|
||||
INSERT INTO check_system_tables VALUES (1, 1, 1);
|
||||
|
||||
SELECT parts, active_parts,total_marks FROM system.tables WHERE name = 'check_system_tables' AND database = currentDatabase();
|
||||
|
||||
INSERT INTO check_system_tables VALUES (1, 2, 1);
|
||||
|
||||
SELECT parts, active_parts,total_marks FROM system.tables WHERE name = 'check_system_tables' AND database = currentDatabase();
|
||||
|
||||
ALTER TABLE check_system_tables DETACH PARTITION 1;
|
||||
|
||||
SELECT parts, active_parts,total_marks FROM system.tables WHERE name = 'check_system_tables' AND database = currentDatabase();
|
||||
|
||||
DROP TABLE IF EXISTS check_system_tables;
|
Loading…
Reference in New Issue
Block a user