ClickHouse/tests/queries/0_stateless/2021_h3_get_faces.sql

17 lines
614 B
MySQL
Raw Normal View History

2021-09-22 06:07:12 +00:00
-- Tags: no-unbundled, no-fasttest
2021-09-21 21:11:02 +00:00
DROP TABLE IF EXISTS h3_indexes;
CREATE TABLE h3_indexes (h3_index UInt64) ENGINE = Memory;
2021-09-22 06:07:12 +00:00
-- test H3 indexes from: https://github.com/uber/h3-java/blob/master/src/test/java/com/uber/h3core/TestInspection.java#L86
2021-09-21 21:11:02 +00:00
INSERT INTO h3_indexes VALUES (stringToH3('0x85283473fffffffL'));
INSERT INTO h3_indexes VALUES (stringToH3('85283473fffffff'));
INSERT INTO h3_indexes VALUES (stringToH3('0x8167bffffffffffL'));
INSERT INTO h3_indexes VALUES (stringToH3('0x804dfffffffffffL'));
SELECT arraySort(h3GetFaces(h3_index)) FROM h3_indexes ORDER BY h3_index;
2021-09-21 21:11:02 +00:00
DROP TABLE h3_indexes;