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
preguntada hace 4 meses421 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas