ClickHouse/tests/queries/0_stateless/02021_h3_is_res_classIII.sql

17 lines
553 B
MySQL
Raw Normal View History

2021-11-21 10:58:26 +00:00
-- Tags: no-fasttest
2021-09-29 14:43:35 +00:00
DROP TABLE IF EXISTS h3_indexes;
CREATE TABLE h3_indexes (h3_index UInt64) ENGINE = Memory;
-- test H3 indexes from: https://github.com/uber/h3-java/blob/master/src/test/java/com/uber/h3core/TestInspection.java#L57
INSERT INTO h3_indexes VALUES (geoToH3(0.0, 0.0, 0));
INSERT INTO h3_indexes VALUES (geoToH3(10.0, 0.0, 1));
INSERT INTO h3_indexes VALUES (geoToH3(0.0, 10.0, 2));
INSERT INTO h3_indexes VALUES (geoToH3(10.0, 10.0, 3));
SELECT h3IsResClassIII(h3_index) FROM h3_indexes ORDER BY h3_index;
DROP TABLE h3_indexes;