add tests for h3PointDistKm func

This commit is contained in:
bharatnc 2022-02-13 08:58:04 -08:00
parent 982e6aae42
commit 4bcbb30172
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,12 @@
111.1950519752296
111.22891103262542
111.9010753744776
111.90107537447763
111.90107537447763
157.22560925091386
157.24955851177873
222.45778082261498
223.528369444664
223.528369444664
400.9006688220521
2223.901039504589

View File

@ -0,0 +1,22 @@
-- Tags: no-fasttest
DROP TABLE IF EXISTS table1;
CREATE TABLE table1 (lat1 Float64, lon1 Float64, lat2 Float64, lon2 Float64) ENGINE = Memory;
INSERT INTO table1 VALUES(-10.0 ,0.0, 10.0, 0.0);
INSERT INTO table1 VALUES(-1, -1, 2, 1);
INSERT INTO table1 VALUES(0, 2, 1, 3);
INSERT INTO table1 VALUES(-2, -3, -1, -2);
INSERT INTO table1 VALUES(-87, 0, -85, 3);
INSERT INTO table1 VALUES(-89, 1, -88, 2);
INSERT INTO table1 VALUES(-84, 1, -83, 2);
INSERT INTO table1 VALUES(-88, 90, -86, 91);
INSERT INTO table1 VALUES(-84, -91, -83, -90);
INSERT INTO table1 VALUES(-90, 181, -89, 182);
INSERT INTO table1 VALUES(-84, 181, -83, 182);
INSERT INTO table1 VALUES(-87, 0, -85, 3);
select h3PointDistKm(lat1, lon1,lat2, lon2) AS k from table1 order by k;
DROP TABLE table1