"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?

asked a year ago374 views
1 Answer
0
Accepted Answer

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

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions