mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-20 07:21:02 +00:00
e373862c83
uniqCombined() uses hashtable for medium cardinality, and since HashTable resize by the power of 2 (well actually HashTableGrower grows double by the power of 2, hence HashTableGrower::increaseSize() should be overwritten to change this), with 1<<13 (default for uniqCombined) and UInt64 HashValueType, the HashTable will takes: getBufferSizeInBytes() == 131072 While it should be not greater then sizeof(HLL) ~= 98K, so reduce the maximum cardinality for hashtable to 1<<12 with UInt64 HashValueType and to 1<13 with UInt32, overwrite HashTableGrower::increaseSize() and cover this using max_memory_usage. Refs: https://github.com/ClickHouse/ClickHouse/pull/7221#issuecomment-539672742 v2: cover uniqCombined() with non-default K
15 lines
95 B
Plaintext
15 lines
95 B
Plaintext
UInt32
|
|
819200
|
|
UInt64
|
|
409600
|
|
K=16
|
|
UInt32
|
|
409600
|
|
UInt64
|
|
204800
|
|
K=18
|
|
UInt32
|
|
1638400
|
|
UInt64
|
|
819200
|