Skip to content

Commit

Permalink
Merge pull request ClickHouse#49825 from den-crane/patch-66
Browse files Browse the repository at this point in the history
Doc. Note about why Google CityHash <> cityHash64
  • Loading branch information
rschu1ze authored May 12, 2023
2 parents 725a334 + 5133597 commit f011421
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/en/sql-reference/functions/hash-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ cityHash64(par1,...)

This is a fast non-cryptographic hash function. It uses the CityHash algorithm for string parameters and implementation-specific fast non-cryptographic hash function for parameters with other data types. The function uses the CityHash combinator to get the final results.

Note that Google changed the algorithm of CityHash after it has been added to ClickHouse. In other words, ClickHouse's cityHash64 and Google's upstream CityHash now produce different results. ClickHouse cityHash64 corresponds to CityHash v1.0.2.

**Arguments**

The function takes a variable number of input parameters. Arguments can be any of the [supported data types](/docs/en/sql-reference/data-types/index.md). For some data types calculated value of hash function may be the same for the same values even if types of arguments differ (integers of different size, named and unnamed `Tuple` with the same data, `Map` and the corresponding `Array(Tuple(key, value))` type with the same data).
Expand Down

0 comments on commit f011421

Please sign in to comment.