Merge pull request #72026 from ClickHouse/test_for_33604

Add test for 33604
This commit is contained in:
Nikita Taranov 2024-11-18 14:59:34 +00:00 committed by GitHub
commit 14248d322e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,2 @@
Order: a ASC, b ASC
ReadType: InOrder

View File

@ -0,0 +1,24 @@
CREATE TABLE test
(
a UInt64,
b UInt64
)
ENGINE = MergeTree
ORDER BY (a, b);
INSERT INTO test SELECT number, number FROM numbers_mt(1e6);
set enable_analyzer = 1;
SELECT trimBoth(replaceRegexpAll(explain, '__table1.', ''))
FROM
(
EXPLAIN actions = 1
SELECT count(*)
FROM test
GROUP BY
b,
a
SETTINGS optimize_aggregation_in_order = 1
)
WHERE explain LIKE '%Order%';