Remove harmful code from "geoDistance" #12117

This commit is contained in:
Alexey Milovidov 2020-07-05 00:57:57 +03:00
parent e05283d5d3
commit 731d92657d
4 changed files with 4 additions and 3 deletions

View File

@ -102,8 +102,6 @@ void geodistInit()
inline float geodistDegDiff(float f) inline float geodistDegDiff(float f)
{ {
f = fabsf(f); f = fabsf(f);
while (f > 360)
f -= 360;
if (f > 180) if (f > 180)
f = 360 - f; f = 360 - f;
return f; return f;

View File

@ -45,7 +45,8 @@ public:
internal = internal_; internal = internal_;
} }
/// Obtain information about columns, their types, default values and column comments, for case when columns in CREATE query is specified explicitly. /// Obtain information about columns, their types, default values and column comments,
/// for case when columns in CREATE query is specified explicitly.
static ColumnsDescription getColumnsDescription(const ASTExpressionList & columns, const Context & context, bool sanity_check_compression_codecs); static ColumnsDescription getColumnsDescription(const ASTExpressionList & columns, const Context & context, bool sanity_check_compression_codecs);
static ConstraintsDescription getConstraintsDescription(const ASTExpressionList * constraints); static ConstraintsDescription getConstraintsDescription(const ASTExpressionList * constraints);

View File

@ -0,0 +1 @@
inf

View File

@ -0,0 +1 @@
SELECT geoDistance(0., 0., -inf, 1.);