[RFC] Introduce uniqCombined64() to get sane results for cardinality > UINT_MAX#7222
Merged
alexey-milovidov merged 4 commits intoClickHouse:masterfrom Oct 9, 2019
Merged
Conversation
…_MAX By default uniqCombined() uses 32-bit hash for all types except String, so this means that you cannot use uniqCombined() with i.e UInt64 and cardinality > UINT_MAX, although you can use uniqCombined(toString()) and this will lead to 64-bit hash, but will not have good performance. So uniqCombined64() had been introduced to fix this. Requires: ClickHouse#7213
| throw Exception( | ||
| "Parameter for aggregate function " + name + "is out or range: [12, 20].", ErrorCodes::ARGUMENT_OUT_OF_BOUND); | ||
|
|
||
| "Parameter for aggregate function " + name + " is out or range: [12, 20].", ErrorCodes::ARGUMENT_OUT_OF_BOUND); |
alexey-milovidov
approved these changes
Oct 9, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category (leave one):
Short description (up to few sentences):
Introduce uniqCombined64() to get sane results for cardinality > UINT_MAX
Detailed description (optional):
By default uniqCombined() uses 32-bit hash for all types except String,
so this means that you cannot use uniqCombined() with i.e UInt64 and
cardinality > UINT_MAX, although you can use uniqCombined(toString())
and this will lead to 64-bit hash, but will not have good performance.
Requires: #7213