mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #33754 from yohannj/fix_doc_tupleHammingDistance
fix/doc: update output type of tupleHammingDistance
This commit is contained in:
commit
6e3287038e
@ -134,7 +134,23 @@ Tuples should have the same type of the elements.
|
||||
|
||||
- The Hamming distance.
|
||||
|
||||
Type: [UInt8](../../sql-reference/data-types/int-uint.md).
|
||||
Type: The result type is calculed the same way it is for [Arithmetic functions](../../sql-reference/functions/arithmetic-functions.md), based on the number of elements in the input tuples.
|
||||
|
||||
``` sql
|
||||
SELECT
|
||||
toTypeName(tupleHammingDistance(tuple(0), tuple(0))) AS t1,
|
||||
toTypeName(tupleHammingDistance((0, 0), (0, 0))) AS t2,
|
||||
toTypeName(tupleHammingDistance((0, 0, 0), (0, 0, 0))) AS t3,
|
||||
toTypeName(tupleHammingDistance((0, 0, 0, 0), (0, 0, 0, 0))) AS t4,
|
||||
toTypeName(tupleHammingDistance((0, 0, 0, 0, 0), (0, 0, 0, 0, 0))) AS t5
|
||||
```
|
||||
|
||||
``` text
|
||||
┌─t1────┬─t2─────┬─t3─────┬─t4─────┬─t5─────┐
|
||||
│ UInt8 │ UInt16 │ UInt32 │ UInt64 │ UInt64 │
|
||||
└───────┴────────┴────────┴────────┴────────┘
|
||||
```
|
||||
|
||||
|
||||
**Examples**
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user