Merge pull request #15873 from den-crane/tests/14053_max_length_alias

test for a bug from #14053
This commit is contained in:
Alexander Kuzmenkov 2020-10-14 15:49:55 +03:00 committed by GitHub
commit 71a860dc8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1 @@
11 1 1 8 8 7367

View File

@ -0,0 +1,14 @@
DROP TABLE IF EXISTS max_length_alias_14053;
CREATE TABLE max_length_alias_14053
(`a` Date,`b` UInt16,`c.d` Array(Date),`dcount` UInt16 ALIAS length(c.d))
ENGINE = MergeTree PARTITION BY toMonday(a) ORDER BY (a, b)
SETTINGS index_granularity = 8192;
INSERT INTO max_length_alias_14053 VALUES ('2020-10-06',7367,['2020-10-06','2020-10-06','2020-10-06','2020-10-06','2020-10-06']),('2020-10-06',7367,['2020-10-06','2020-10-06','2020-10-06']),('2020-10-06',7367,['2020-10-06','2020-10-06']),('2020-10-07',7367,['2020-10-07','2020-10-07','2020-10-07','2020-10-07','2020-10-07']),('2020-10-08',7367,['2020-10-08','2020-10-08','2020-10-08','2020-10-08']),('2020-10-11',7367,['2020-10-11','2020-10-11','2020-10-11','2020-10-11','2020-10-11','2020-10-11','2020-10-11','2020-10-11']),('2020-10-11',7367,['2020-10-11']),('2020-08-26',7367,['2020-08-26','2020-08-26']),('2020-08-28',7367,['2020-08-28','2020-08-28','2020-08-28']),('2020-08-29',7367,['2020-08-29']),('2020-09-22',7367,['2020-09-22','2020-09-22','2020-09-22','2020-09-22','2020-09-22','2020-09-22','2020-09-22']);
SELECT count(), min(length(c.d)) AS minExpr, min(dcount) AS minAlias,
max(length(c.d)) AS maxExpr, max(dcount) AS maxAlias, b
FROM max_length_alias_14053 GROUP BY b;
DROP TABLE max_length_alias_14053;