2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS nested;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE nested (x UInt8, n Nested(a UInt64, b String)) ENGINE = TinyLog;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO nested VALUES (1, [2, 3], ['Hello', 'World']);
|
|
|
|
INSERT INTO nested VALUES (4, [5], ['Goodbye']);
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM nested ORDER BY x;
|
|
|
|
SELECT x, n.a FROM nested ORDER BY x;
|
|
|
|
SELECT n.a, n.b FROM nested ORDER BY n.a;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS nested;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE nested (x UInt8, n Nested(a UInt64, b String)) ENGINE = Log;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO nested VALUES (1, [2, 3], ['Hello', 'World']);
|
|
|
|
INSERT INTO nested VALUES (4, [5], ['Goodbye']);
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM nested ORDER BY x;
|
|
|
|
SELECT x, n.a FROM nested ORDER BY x;
|
|
|
|
SELECT n.a, n.b FROM nested ORDER BY n.a;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS nested;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE nested (x UInt8, n Nested(a UInt64, b String)) ENGINE = StripeLog;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO nested VALUES (1, [2, 3], ['Hello', 'World']);
|
|
|
|
INSERT INTO nested VALUES (4, [5], ['Goodbye']);
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM nested ORDER BY x;
|
|
|
|
SELECT x, n.a FROM nested ORDER BY x;
|
|
|
|
SELECT n.a, n.b FROM nested ORDER BY n.a;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS nested;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE nested (x UInt8, n Nested(a UInt64, b String)) ENGINE = Memory;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO nested VALUES (1, [2, 3], ['Hello', 'World']);
|
|
|
|
INSERT INTO nested VALUES (4, [5], ['Goodbye']);
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM nested ORDER BY x;
|
|
|
|
SELECT x, n.a FROM nested ORDER BY x;
|
|
|
|
SELECT n.a, n.b FROM nested ORDER BY n.a;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS nested;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE nested (x UInt8, n Nested(a UInt64, b String)) ENGINE = MergeTree ORDER BY x;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO nested VALUES (1, [2, 3], ['Hello', 'World']);
|
|
|
|
INSERT INTO nested VALUES (4, [5], ['Goodbye']);
|
2018-01-02 09:11:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM nested ORDER BY x;
|
|
|
|
SELECT x, n.a FROM nested ORDER BY x;
|
|
|
|
SELECT n.a, n.b FROM nested ORDER BY n.a;
|
2018-01-02 09:11:13 +00:00
|
|
|
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE nested;
|