Skip to content

Commit f02edaa

Browse files
Merge pull request #12137 from ClickHouse/fix-loop-geodistance
Remove harmful code from "geoDistance"
2 parents c257255 + 731d926 commit f02edaa

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/Functions/greatCircleDistance.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ void geodistInit()
102102
inline float geodistDegDiff(float f)
103103
{
104104
f = fabsf(f);
105-
while (f > 360)
106-
f -= 360;
107105
if (f > 180)
108106
f = 360 - f;
109107
return f;

src/Interpreters/InterpreterCreateQuery.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class InterpreterCreateQuery : public IInterpreter
4545
internal = internal_;
4646
}
4747

48-
/// Obtain information about columns, their types, default values and column comments, for case when columns in CREATE query is specified explicitly.
48+
/// Obtain information about columns, their types, default values and column comments,
49+
/// for case when columns in CREATE query is specified explicitly.
4950
static ColumnsDescription getColumnsDescription(const ASTExpressionList & columns, const Context & context, bool sanity_check_compression_codecs);
5051
static ConstraintsDescription getConstraintsDescription(const ASTExpressionList * constraints);
5152

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
inf
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT geoDistance(0., 0., -inf, 1.);

0 commit comments

Comments
 (0)