Csaba Ringhofer created HIVE-29352:
--------------------------------------
Summary: Add ST_DistanceSphere for points
Key: HIVE-29352
URL: https://issues.apache.org/jira/browse/HIVE-29352
Project: Hive
Issue Type: Sub-task
Reporter: Csaba Ringhofer
ST_DistanceSphere uses a simple formula to calculate distance between points.
Getting the shortest distance between complex shapes like polygons is much more
complicated so I would postpone that till a library is found for it. Apache
Trino / Sedona also implement it properly only for points (e.g
[link|https://github.com/trinodb/trino/blob/e38f360675762e6b64b89e89319d81ffc07fe474/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoFunctions.java#L1638]).
A workaround is to calculate the centroid of complex shapes (st_centroid) and
use ST_DistanceSphere on the returned points.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)