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 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容