Csaba Ringhofer created HIVE-29395:
--------------------------------------
Summary: st_point inconsistent with postgis
Key: HIVE-29395
URL: https://issues.apache.org/jira/browse/HIVE-29395
Project: Hive
Issue Type: Improvement
Reporter: Csaba Ringhofer
The 3 argument st_point constructor has different semantics in Hive than
PostGis:
https://postgis.net/docs/ST_Point.html
Hive considers the 3rd argument Z value:
select st_astext(st_point(1, 2, 3)); -- returns POINT Z (1 2 3)
select st_srid(st_point(1, 2, 3)); -- returns 0
PostGis considers it srid:
select st_astext(st_point(1, 2, 3)); -- returns POINT(1 2)
select st_srid(st_point(1, 2, 3)); --returns 3
In Hive there is also a 4 argument constructor with the last argument used as M.
PostGis has pointz/pointm/pointzm do set Z/M.
I think that that the Hive way is problematic, because in the 3 argument case
it assumes Z, while it could be also M - the different constructors above are
the right way to differentiate.
Same issue came up in Apache Sedona and they went for PostGis compatibility:
SEDONA-234
--
This message was sent by Atlassian Jira
(v8.20.10#820010)