From 5d20acca44b847e61b97ac14243edcef1b84adc5 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:29:49 +0800 Subject: [PATCH] fix: round euclidean result in sqlness (#4956) --- tests/cases/standalone/common/function/geo.result | 4 ++-- tests/cases/standalone/common/function/geo.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cases/standalone/common/function/geo.result b/tests/cases/standalone/common/function/geo.result index 2f0d08b851c9..4255a7db35c5 100644 --- a/tests/cases/standalone/common/function/geo.result +++ b/tests/cases/standalone/common/function/geo.result @@ -143,7 +143,7 @@ SELECT h3_grid_distance(cell1, cell2) AS distance, h3_grid_path_cells(cell1, cell2) AS path_cells, round(h3_distance_sphere_km(cell1, cell2), 5) AS sphere_distance, - h3_distance_degree(cell1, cell2) AS euclidean_distance, + round(h3_distance_degree(cell1, cell2), 14) AS euclidean_distance, FROM ( SELECT @@ -154,7 +154,7 @@ FROM +----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+--------------------+ | distance | path_cells | sphere_distance | euclidean_distance | +----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+--------------------+ -| 9 | [604189371209351167, 604189371075133439, 604189375235883007, 604189375101665279, 604189638034194431, 604189638571065343, 604189638436847615, 604189642597597183, 604189642463379455, 604189641255419903] | 55.05017 | 0.5493924369709845 | +| 9 | [604189371209351167, 604189371075133439, 604189375235883007, 604189375101665279, 604189638034194431, 604189638571065343, 604189638436847615, 604189642597597183, 604189642463379455, 604189641255419903] | 55.05017 | 0.54939243697098 | +----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+--------------------+ SELECT diff --git a/tests/cases/standalone/common/function/geo.sql b/tests/cases/standalone/common/function/geo.sql index 93565f30fcda..d2b2460c5072 100644 --- a/tests/cases/standalone/common/function/geo.sql +++ b/tests/cases/standalone/common/function/geo.sql @@ -49,7 +49,7 @@ SELECT h3_grid_distance(cell1, cell2) AS distance, h3_grid_path_cells(cell1, cell2) AS path_cells, round(h3_distance_sphere_km(cell1, cell2), 5) AS sphere_distance, - h3_distance_degree(cell1, cell2) AS euclidean_distance, + round(h3_distance_degree(cell1, cell2), 14) AS euclidean_distance, FROM ( SELECT