2021-11-21 10:58:26 +00:00
|
|
|
-- Tags: no-fasttest
|
2021-09-12 12:35:27 +00:00
|
|
|
|
2022-01-23 14:20:31 +00:00
|
|
|
SELECT arraySort(h3kRing(581276613233082367, toUInt16(1)));
|
|
|
|
SELECT h3kRing(581276613233082367, toUInt16(0));
|
|
|
|
SELECT h3kRing(581276613233082367, -1); -- { serverError 43 }
|
|
|
|
SELECT h3kRing(581276613233082367, toUInt16(-1)); -- { serverError 12 }
|
2022-01-20 14:08:13 +00:00
|
|
|
|
2022-05-13 13:20:04 +00:00
|
|
|
SELECT arraySort(h3kRing(581276613233082367, 1));
|
|
|
|
SELECT h3kRing(581276613233082367, 0);
|
|
|
|
SELECT h3kRing(581276613233082367, -1); -- { serverError 43 }
|
2022-01-20 14:08:13 +00:00
|
|
|
|
|
|
|
DROP TABLE IF EXISTS h3_indexes;
|
|
|
|
|
2022-01-23 14:20:31 +00:00
|
|
|
-- Test h3 indices and k selected from original test fixture: https://github.com/uber/h3/blob/master/src/apps/testapps
|
|
|
|
|
|
|
|
CREATE TABLE h3_indexes (h3_index UInt64, k UInt16) ENGINE = Memory;
|
2022-01-20 14:08:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO h3_indexes VALUES (579205133326352383,1);
|
|
|
|
INSERT INTO h3_indexes VALUES (581263419093549055,2);
|
|
|
|
INSERT INTO h3_indexes VALUES (589753847883235327,3);
|
|
|
|
INSERT INTO h3_indexes VALUES (594082350283882495,4);
|
|
|
|
INSERT INTO h3_indexes VALUES (598372386957426687,5);
|
|
|
|
INSERT INTO h3_indexes VALUES (599542359671177215,6);
|
|
|
|
INSERT INTO h3_indexes VALUES (604296355086598143,7);
|
|
|
|
INSERT INTO h3_indexes VALUES (608785214872748031,8);
|
|
|
|
INSERT INTO h3_indexes VALUES (615732192485572607,9);
|
|
|
|
INSERT INTO h3_indexes VALUES (617056794467368959,10);
|
|
|
|
INSERT INTO h3_indexes VALUES (624586477873168383,11);
|
|
|
|
INSERT INTO h3_indexes VALUES (627882919484481535,12);
|
|
|
|
INSERT INTO h3_indexes VALUES (634600058503392255,13);
|
|
|
|
INSERT INTO h3_indexes VALUES (635544851677385791,14);
|
|
|
|
INSERT INTO h3_indexes VALUES (639763125756281263,15);
|
|
|
|
INSERT INTO h3_indexes VALUES (644178757620501158,16);
|
|
|
|
|
|
|
|
|
2022-01-23 14:20:31 +00:00
|
|
|
SELECT arraySort(h3kRing(h3_index, k)) FROM h3_indexes ORDER BY h3_index;
|
2022-01-20 14:08:13 +00:00
|
|
|
|
|
|
|
DROP TABLE h3_indexes;
|