Hey there,
I have a problem with some geospacial queries in crateDB, especially distance
I have a query like
SELECT date, creation_date, code, distance([latitude, longitude], [48.58916271607118, 2.0338593032353143 ])::integer as distance
FROM "doc"."weather_2_hourly"
where date = '2024-12-24T00:00'
and distance([latitude, longitude], [48.58916271607118, 2.0338593032353143 ]) < 100000
order by distance desc
LIMIT 10;
and I get an error like
UnsupportedFeatureException[Cannot ORDER BY ''Pt(x=48.58916271607118,y=2.0338593032353143)'': invalid data type 'geo_point'.]
The funny part is that if I order by date for example, I very well see the distance as a number, and the numerical operator works also, just the order does not do it.
Any help/hint would be appreciated