mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
fix fuzzer
This commit is contained in:
parent
625576796c
commit
fa816ab19c
@ -79,10 +79,13 @@ public:
|
||||
const Float64 lat = col_lat->getFloat64(row);
|
||||
|
||||
if (isNaN(lon) || isNaN(lat))
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
|
||||
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
|
||||
"Arguments must not be NaN");
|
||||
|
||||
if (!(isFinite(lon) && isFinite(lat)))
|
||||
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
|
||||
"Arguments must not be infinite");
|
||||
|
||||
/// S2 acceptes point as (latitude, longitude)
|
||||
S2LatLng lat_lng = S2LatLng::FromDegrees(lat, lon);
|
||||
S2CellId id(lat_lng);
|
||||
|
@ -43,6 +43,8 @@ SELECT s2ToGeo(toUInt64(-1));
|
||||
SELECT s2ToGeo(nan); -- { serverError 43 }
|
||||
SELECT geoToS2(toFloat64(toUInt64(-1)), toFloat64(toUInt64(-1)));
|
||||
SELECT geoToS2(nan, nan); -- { serverError 43 }
|
||||
SELECT geoToS2(-inf, 1.1754943508222875e-38); -- { serverError 43 }
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS s2_indexes;
|
||||
|
Loading…
Reference in New Issue
Block a user