Update column.md

This commit is contained in:
Denny Crane 2021-11-09 17:34:28 -04:00 committed by GitHub
parent d7be766581
commit 8ea209c084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,6 +212,9 @@ SET mutations_sync = 2;
CREATE TABLE tmp (x Int64) ENGINE = MergeTree() ORDER BY tuple() PARTITION BY tuple();
INSERT INTO tmp SELECT * FROM system.numbers LIMIT 10;
ALTER TABLE tmp ADD COLUMN s String MATERIALIZED toString(x);
ALTER TABLE tmp MATERIALIZE COLUMN s;
SELECT groupArray(x), groupArray(s) FROM tmp;
```