ClickHouse/tests/queries/0_stateless/01128_generate_random_nested.sql
Alexander Tokmakov c068593a0d fix tests
2022-06-23 12:58:34 +02:00

11 lines
505 B
SQL

DROP TABLE IF EXISTS mass_table_312;
set allow_deprecated_syntax_for_merge_tree=1;
CREATE TABLE mass_table_312 (d Date DEFAULT '2000-01-01', x UInt64, n Nested(a String, b String)) ENGINE = MergeTree(d, x, 1);
INSERT INTO mass_table_312 SELECT * FROM generateRandom('`d` Date,`x` UInt64,`n.a` Array(String),`n.b` Array(String)', 1, 10, 2) LIMIT 100;
SELECT count(), sum(cityHash64(*)) FROM mass_table_312;
SELECT count(), sum(cityHash64(*)) FROM mass_table_312 ARRAY JOIN n;
DROP TABLE mass_table_312;