AWS Athena st_centroid yields wrong result due to old Trino version

0

The query below on current AWS Athena version 3 gives a wrong result for the centroid, which lies way below the polygon (POINT (6.127790214246207 46.2084751184263)). The exact same query in PostGIS gives the correct POINT (6.1278266666666665 46.20875).

WITH poly AS (
    SELECT st_geometryfromtext('POLYGON ((
        6.12784 46.20880,
        6.12780 46.20873,
        6.12784 46.20872,
        6.12784 46.20880))') AS polygon
)
SELECT st_centroid(poly.polygon) as centroid_athena, poly.polygon
FROM poly

I also checked this for various Trino versions. The current Trino version 436 yields the correct result. Version 369 from roughly a year ago produces the same wrong output as AWS Athena.

When does AWS update the Trino version underlying Athena?

mcsoini
已提問 4 個月前檢視次數 421 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南