mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Update hash_functions.md
This commit is contained in:
parent
a64db10135
commit
28fbfc8405
@ -189,8 +189,6 @@ SELECT javaHash('');
|
||||
|
||||
A `Int32` data type hash value.
|
||||
|
||||
Type: `javaHash`.
|
||||
|
||||
**Example**
|
||||
|
||||
Query:
|
||||
@ -209,7 +207,7 @@ Result:
|
||||
|
||||
## javaHashUTF16LE {#javahashutf16le}
|
||||
|
||||
Calculates [JavaHash](http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/478a4add975b/src/share/classes/java/lang/String.java#l1452) from a string in UTF-16LE encoding.
|
||||
Calculates [JavaHash](http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/478a4add975b/src/share/classes/java/lang/String.java#l1452) from a string, assuming it contains bytes representing a string in UTF-16LE encoding.
|
||||
|
||||
**Syntax**
|
||||
|
||||
@ -225,8 +223,6 @@ javaHashUTF16LE(stringUtf16le)
|
||||
|
||||
A `Int32` data type hash value.
|
||||
|
||||
Type: `javaHash`.
|
||||
|
||||
**Example**
|
||||
|
||||
Correct query with UTF-16LE encoded string.
|
||||
@ -245,38 +241,6 @@ Result:
|
||||
└──────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
If string with any other encoding than `utf-16le` has passed then different hash will be returned.
|
||||
|
||||
Query:
|
||||
|
||||
```sql
|
||||
SELECT javaHashUTF16LE('test')
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
┌─javaHashUTF16LE('test')─┐
|
||||
│ 834943 │
|
||||
└─────────────────────────┘
|
||||
```
|
||||
|
||||
Without `convertCharset` function some result will be returned.
|
||||
|
||||
Query:
|
||||
|
||||
```sql
|
||||
SELECT javaHashUTF16LE('FJKLDSJFIOLD_389159837589429')
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
┌─javaHashUTF16LE('FJKLDSJFIOLD_389159837589429')─┐
|
||||
│ -1788019318 │
|
||||
└─────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## hiveHash {#hash_functions-hivehash}
|
||||
|
||||
Calculates `HiveHash` from a string.
|
||||
|
Loading…
Reference in New Issue
Block a user