This commit is contained in:
Nikita Mikhaylov 2021-03-11 15:19:15 +03:00
parent 934b5bc487
commit b219b7626e
2 changed files with 8 additions and 2 deletions

View File

@ -425,8 +425,14 @@ private:
T & out_container) const
{
out_container.reserve(end - begin);
for (size_t i = begin; i < end; ++i)
for (size_t i = begin; i < end; ++i) {
Int64 result = 0;
if (common::mulOverflow(static_cast<Int64>(x_data[i]), static_cast<Int64>(y_data[i]), result))
throw Exception("The coordinates of the point are such that subsequent calculations cannot be performed correctly. " \
"Most likely they are very large in modulus.", ErrorCodes::BAD_ARGUMENTS);
out_container.emplace_back(x_data[i], y_data[i]);
}
}
void parseConstPolygonWithoutHolesFromSingleColumn(const IColumn & column, size_t i, Polygon & out_polygon) const

View File

@ -1 +1 @@
SELECT pointInPolygon((0, 0), [[(0, 0), (10, 10), (256, -9223372036854775808)]]) FORMAT Null;
SELECT pointInPolygon((0, 0), [[(0, 0), (10, 10), (256, -9223372036854775808)]]) FORMAT Null ;-- { serverError 36 }