mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-03 20:02:54 +00:00
tests: add sqlness tests for geo functions
This commit is contained in:
48
tests/cases/standalone/common/function/geo.result
Normal file
48
tests/cases/standalone/common/function/geo.result
Normal file
@@ -0,0 +1,48 @@
|
||||
SELECT h3(37.76938, -122.3889, 0);
|
||||
|
||||
+---------------------------------------------------+
|
||||
| h3(Float64(37.76938),Float64(-122.3889),Int64(0)) |
|
||||
+---------------------------------------------------+
|
||||
| 8029fffffffffff |
|
||||
+---------------------------------------------------+
|
||||
|
||||
SELECT h3(37.76938, -122.3889, 1);
|
||||
|
||||
+---------------------------------------------------+
|
||||
| h3(Float64(37.76938),Float64(-122.3889),Int64(1)) |
|
||||
+---------------------------------------------------+
|
||||
| 81283ffffffffff |
|
||||
+---------------------------------------------------+
|
||||
|
||||
SELECT h3(37.76938, -122.3889, 8);
|
||||
|
||||
+---------------------------------------------------+
|
||||
| h3(Float64(37.76938),Float64(-122.3889),Int64(8)) |
|
||||
+---------------------------------------------------+
|
||||
| 88283082e7fffff |
|
||||
+---------------------------------------------------+
|
||||
|
||||
SELECT geohash(37.76938, -122.3889, 9);
|
||||
|
||||
+--------------------------------------------------------+
|
||||
| geohash(Float64(37.76938),Float64(-122.3889),Int64(9)) |
|
||||
+--------------------------------------------------------+
|
||||
| 9q8yygxne |
|
||||
+--------------------------------------------------------+
|
||||
|
||||
SELECT geohash(37.76938, -122.3889, 10);
|
||||
|
||||
+---------------------------------------------------------+
|
||||
| geohash(Float64(37.76938),Float64(-122.3889),Int64(10)) |
|
||||
+---------------------------------------------------------+
|
||||
| 9q8yygxnef |
|
||||
+---------------------------------------------------------+
|
||||
|
||||
SELECT geohash(37.76938, -122.3889, 11);
|
||||
|
||||
+---------------------------------------------------------+
|
||||
| geohash(Float64(37.76938),Float64(-122.3889),Int64(11)) |
|
||||
+---------------------------------------------------------+
|
||||
| 9q8yygxneft |
|
||||
+---------------------------------------------------------+
|
||||
|
||||
11
tests/cases/standalone/common/function/geo.sql
Normal file
11
tests/cases/standalone/common/function/geo.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
SELECT h3(37.76938, -122.3889, 0);
|
||||
|
||||
SELECT h3(37.76938, -122.3889, 1);
|
||||
|
||||
SELECT h3(37.76938, -122.3889, 8);
|
||||
|
||||
SELECT geohash(37.76938, -122.3889, 9);
|
||||
|
||||
SELECT geohash(37.76938, -122.3889, 10);
|
||||
|
||||
SELECT geohash(37.76938, -122.3889, 11);
|
||||
Reference in New Issue
Block a user