mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-08-18 03:58:29 +00:00
feat: add function to aggregate path into a geojson path (#4798)
* feat: add geojson function to aggregate paths * test: add sqlness results * test: add sqlness * refactor: corrected to aggregation function * chore: update comments * fix: make linter happy again * refactor: rename to remove `geo` from `geojson` function name The return type is not geojson at all. It's just compatible with geojson's coordinates part and superset's deckgl path plugin.
This commit is contained in:
@@ -66,3 +66,16 @@ SELECT geohash(37.76938, -122.3889, 11::UInt32);
|
||||
SELECT geohash(37.76938, -122.3889, 11::UInt64);
|
||||
|
||||
SELECT geohash_neighbours(37.76938, -122.3889, 11);
|
||||
|
||||
SELECT json_encode_path(37.76938, -122.3889, 1728083375::TimestampSecond);
|
||||
|
||||
SELECT json_encode_path(lat, lon, ts)
|
||||
FROM(
|
||||
SELECT 37.76938 AS lat, -122.3889 AS lon, 1728083375::TimestampSecond AS ts
|
||||
UNION ALL
|
||||
SELECT 37.76928 AS lat, -122.3839 AS lon, 1728083373::TimestampSecond AS ts
|
||||
UNION ALL
|
||||
SELECT 37.76930 AS lat, -122.3820 AS lon, 1728083379::TimestampSecond AS ts
|
||||
UNION ALL
|
||||
SELECT 37.77001 AS lat, -122.3888 AS lon, 1728083372::TimestampSecond AS ts
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user