mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
check for validity of h3 index
This commit is contained in:
parent
6e49b76cfd
commit
57cfc0bd04
@ -92,6 +92,12 @@ public:
|
||||
{
|
||||
const UInt64 origin = data_hindex_origin[row];
|
||||
const UInt64 dest = data_hindex_dest[row];
|
||||
|
||||
if (!isValidCell(origin))
|
||||
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Invalid origin H3 index: {}", origin);
|
||||
if (!isValidCell(dest))
|
||||
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Invalid dest H3 index: {}", dest);
|
||||
|
||||
UInt64 res = getUnidirectionalEdge(origin, dest);
|
||||
dst_data[row] = res;
|
||||
}
|
||||
|
@ -21,3 +21,5 @@ select h3GetUnidirectionalEdge(stringToH3('85283473fffffff'), stringToH3('852834
|
||||
|
||||
SELECT h3UnidirectionalEdgeIsValid(1248204388774707199) as edge;
|
||||
SELECT h3UnidirectionalEdgeIsValid(1248204388774707197) as edge;
|
||||
|
||||
SELECT h3GetUnidirectionalEdge(stringToH3('85283473ffffff'), stringToH3('852\03477fffffff')), NULL, NULL; -- { serverError 43 }
|
||||
|
Loading…
Reference in New Issue
Block a user