Skip to content

Commit

Permalink
fix: round euclidean result in sqlness (GreptimeTeam#4956)
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r authored Nov 7, 2024
1 parent e373334 commit 5d20acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/cases/standalone/common/function/geo.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/standalone/common/function/geo.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d20acc

Please sign in to comment.