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
feita há 4 meses421 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas