mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
be831d09f7
* [WIP] * Update skip-list * Update ci_config.json * Do not sync inserts for test * Fix more tests * Fix another test * Enable one more test * More fixed tests * More test fixes * Do not absolutize server path for now * More test fixes * Unset CLICKHOUSE_LOG_COMMENT where necessary * Remove debugging set -e * Fix more tests * Fix test reference * Fix style check
52 lines
1.8 KiB
SQL
52 lines
1.8 KiB
SQL
DROP TABLE IF EXISTS subcolumns;
|
|
|
|
CREATE TABLE subcolumns
|
|
(
|
|
t Tuple
|
|
(
|
|
a Array(Nullable(UInt32)),
|
|
u UInt32,
|
|
s Nullable(String)
|
|
),
|
|
arr Array(Nullable(String)),
|
|
arr2 Array(Array(Nullable(String))),
|
|
lc LowCardinality(String),
|
|
nested Nested(col1 String, col2 Nullable(UInt32))
|
|
)
|
|
ENGINE = MergeTree order by tuple() SETTINGS min_bytes_for_wide_part = '10M';
|
|
|
|
INSERT INTO subcolumns VALUES (([1, NULL], 2, 'a'), ['foo', NULL, 'bar'], [['123'], ['456', '789']], 'qqqq', ['zzz', 'xxx'], [42, 43]);
|
|
SELECT * FROM subcolumns;
|
|
SELECT t.a, t.u, t.s, nested.col1, nested.col2, lc FROM subcolumns;
|
|
SELECT t.a.size0, t.a.null, t.u, t.s, t.s.null FROM subcolumns;
|
|
SELECT sumArray(arr.null), sum(arr.size0) FROM subcolumns;
|
|
SELECT arr2, arr2.size0, arr2.size1, arr2.null FROM subcolumns;
|
|
-- SELECT nested.col1, nested.col2, nested.col1.size0, nested.col2.size0, nested.col2.null FROM subcolumns;
|
|
|
|
DROP TABLE IF EXISTS subcolumns;
|
|
|
|
CREATE TABLE subcolumns
|
|
(
|
|
t Tuple
|
|
(
|
|
a Array(Nullable(UInt32)),
|
|
u UInt32,
|
|
s Nullable(String)
|
|
),
|
|
arr Array(Nullable(String)),
|
|
arr2 Array(Array(Nullable(String))),
|
|
lc LowCardinality(String),
|
|
nested Nested(col1 String, col2 Nullable(UInt32))
|
|
)
|
|
ENGINE = MergeTree order by tuple() SETTINGS min_bytes_for_wide_part = 0;
|
|
|
|
INSERT INTO subcolumns VALUES (([1, NULL], 2, 'a'), ['foo', NULL, 'bar'], [['123'], ['456', '789']], 'qqqq', ['zzz', 'xxx'], [42, 43]);
|
|
SELECT * FROM subcolumns;
|
|
SELECT t.a, t.u, t.s, nested.col1, nested.col2, lc FROM subcolumns;
|
|
SELECT t.a.size0, t.a.null, t.u, t.s, t.s.null FROM subcolumns;
|
|
SELECT sumArray(arr.null), sum(arr.size0) FROM subcolumns;
|
|
SELECT arr2, arr2.size0, arr2.size1, arr2.null FROM subcolumns;
|
|
-- SELECT nested.col1, nested.col2, nested.size0, nested.size0, nested.col2.null FROM subcolumns;
|
|
|
|
DROP TABLE subcolumns;
|