"Unknown type: geometry" when creating a view in "Athena engine version 3"

1

When creating a view (in a Glue Catalog Database) which uses geometric functions using Athena engine version 3, I get the error Unknown type: geometry. Using "Athena engine version 2" I don't get an error.

Example query:

CREATE VIEW test_view1 AS 
SELECT * FROM (Values (1)) as t(id) 
WHERE ST_CONTAINS(ST_GeometryFromText('POLYGON((0 2,1 1,0 -1,0 2))'), ST_Point(0.9, 1))

Note: This is a simplified query to be able to quickly reproduce the error. The error message is also shown when using an existent table instead of (Values (1)) as t(id) or when reading the values ('POLYGON((0 2,1 1,0 -1,0 2))', 0.9, 1) from other tables or when using other functions but ST_CONTAINS.

When running:

SELECT ST_CONTAINS(ST_GeometryFromText('POLYGON((0 2,1 1,0 -1,0 2))'), ST_Point(0.9, 1))

The result is "true" as expected. Creating views without geometric functions also works.

Also when creating the view directly locally in Trino version 398 (using docker run --name trino -d -p 8080:8080 trinodb/trino:398) in the predefined memory catalog, this error is not displayed.

Can those geometric functions somehow be used when creating views using Athena 3 in a Glue Catalog Database?

demandé il y a un an380 vues
1 réponse
0
Réponse acceptée

It works now. Looks like the Bug has been fixed.

répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions