mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
docs for h3Distance
This commit is contained in:
parent
ef623a39a0
commit
2721955f49
@ -1064,4 +1064,43 @@ Result:
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## h3Distance {#h3distance}
|
||||
|
||||
Returns the distance in grid cells between the two indices that are provided.
|
||||
|
||||
**Syntax**
|
||||
|
||||
``` sql
|
||||
h3Distance(start,end)
|
||||
```
|
||||
|
||||
**Parameter**
|
||||
|
||||
- `start` — Hexagon index number that represents a starting point. Type: [UInt64](../../../sql-reference/data-types/int-uint.md).
|
||||
- `end` — Hexagon index number that represents an ending point. Type: [UInt64](../../../sql-reference/data-types/int-uint.md).
|
||||
|
||||
**Returned value**
|
||||
|
||||
- Number of grid cells.
|
||||
|
||||
Type: [Int64](../../../sql-reference/data-types/int-uint.md).
|
||||
|
||||
Returns a negative number if finding the distance fails.
|
||||
|
||||
**Example**
|
||||
|
||||
Query:
|
||||
|
||||
``` sql
|
||||
SELECT h3Distance(590080540275638271,590103561300344831) as distance;
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
``` text
|
||||
┌─distance─┐
|
||||
│ 7 │
|
||||
└──────────┘
|
||||
```
|
||||
|
||||
[Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/h3) <!--hide-->
|
||||
|
Loading…
Reference in New Issue
Block a user