enable reading of subcolumn for distributed tables

This commit is contained in:
Anton Popov 2021-05-25 03:49:24 +03:00
parent 83ef34374c
commit 3acbd12c54
3 changed files with 24 additions and 0 deletions

View File

@ -51,6 +51,7 @@ public:
bool supportsSampling() const override { return true; }
bool supportsFinal() const override { return true; }
bool supportsPrewhere() const override { return true; }
bool supportsSubcolumns() const override { return true; }
StoragePolicyPtr getStoragePolicy() const override;
bool isRemote() const override { return true; }

View File

@ -0,0 +1,2 @@
3 0 bbb ccc
3 0 bbb ccc

View File

@ -0,0 +1,21 @@
DROP TABLE IF EXISTS t_subcolumns_local;
DROP TABLE IF EXISTS t_subcolumns_dist;
CREATE TABLE t_subcolumns_local (arr Array(UInt32), n Nullable(String), t Tuple(s1 String, s2 String))
ENGINE = MergeTree ORDER BY tuple();
CREATE TABLE t_subcolumns_dist AS t_subcolumns_local ENGINE = Distributed(test_cluster_two_shards, currentDatabase(), t_subcolumns_local);
INSERT INTO t_subcolumns_local VALUES ([1, 2, 3], 'aaa', ('bbb', 'ccc'));
SELECT arr.size0, n.null, t.s1, t.s2 FROM t_subcolumns_dist;
DROP TABLE t_subcolumns_local;
-- StripeLog doesn't support subcolumns.
CREATE TABLE t_subcolumns_local (arr Array(UInt32), n Nullable(String), t Tuple(s1 String, s2 String)) ENGINE = StripeLog;
SELECT arr.size0, n.null, t.s1, t.s2 FROM t_subcolumns_dist; -- { serverError 47 }
DROP TABLE t_subcolumns_local;
DROP TABLE t_subcolumns_dist;