Merge pull request #23484 from hexiaoting/dev_add_tests

Add testcases for arrayElement
This commit is contained in:
Maksim Kita 2021-04-22 13:24:22 +03:00 committed by GitHub
commit 44393ea78b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
DROP TABLE IF EXISTS test;
CREATE TABLE test (`key` UInt32, `arr` ALIAS [1, 2], `xx` MATERIALIZED arr[1]) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
DROP TABLE test;
CREATE TABLE test (`key` UInt32, `arr` Array(UInt32) ALIAS [1, 2], `xx` MATERIALIZED arr[1]) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
DROP TABLE test;
CREATE TABLE test (`key` UInt32, `arr` Array(UInt32) ALIAS [1, 2], `xx` UInt32 MATERIALIZED arr[1]) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
DROP TABLE test;
CREATE TABLE test (`key` UInt32, `arr` ALIAS [1, 2]) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
ALTER TABLE test ADD COLUMN `xx` UInt32 MATERIALIZED arr[1];
DROP TABLE test;