-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42433 from ClickHouse/backport/22.7/42342
Backport #42342 to 22.7: Choose correct aggregation method for lc128 and lc256
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/queries/0_stateless/02459_low_cardinality_uint128_aggregator.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
0 4950 | ||
1 14950 | ||
2 24950 | ||
3 34950 | ||
4 44950 | ||
5 54950 | ||
6 64950 | ||
7 74950 | ||
8 84950 | ||
9 94950 | ||
0 4950 | ||
1 14950 | ||
2 24950 | ||
3 34950 | ||
4 44950 | ||
5 54950 | ||
6 64950 | ||
7 74950 | ||
8 84950 | ||
9 94950 |
9 changes: 9 additions & 0 deletions
9
tests/queries/0_stateless/02459_low_cardinality_uint128_aggregator.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SET allow_suspicious_low_cardinality_types = 1; | ||
-- LC UInt128 | ||
CREATE TABLE group_by_pk_lc_uint128 (`k` LowCardinality(UInt128), `v` UInt32) ENGINE = MergeTree ORDER BY k PARTITION BY v%50; | ||
INSERT INTO group_by_pk_lc_uint128 SELECT number / 100, number FROM numbers(1000); | ||
SELECT k, sum(v) AS s FROM group_by_pk_lc_uint128 GROUP BY k ORDER BY k ASC LIMIT 1024 SETTINGS optimize_aggregation_in_order = 1; | ||
-- LC UInt256 | ||
CREATE TABLE group_by_pk_lc_uint256 (`k` LowCardinality(UInt256), `v` UInt32) ENGINE = MergeTree ORDER BY k PARTITION BY v%50; | ||
INSERT INTO group_by_pk_lc_uint256 SELECT number / 100, number FROM numbers(1000); | ||
SELECT k, sum(v) AS s FROM group_by_pk_lc_uint256 GROUP BY k ORDER BY k ASC LIMIT 1024 SETTINGS optimize_aggregation_in_order = 1; |