Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PostGIS #24053

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

umartin
Copy link
Contributor

@umartin umartin commented Nov 7, 2024

Description

Add support for geometry type mapping in the PostgreSQL connector.

Additional context and related issues

Issue: #5580
There is an old, inactive PR at #9951

My take is slightly different when it comes to reading PostGIS geometries. The previous attempt rewrote the query and wrapped geometry columns in ST_GeomAsWKB to convert them to a Well Known Binary format. I'm using the native format which is hex encoded EWKB.

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: Add support for geometry type mapping in the PostgreSQL connector

@cla-bot cla-bot bot added the cla-signed label Nov 7, 2024
@github-actions github-actions bot added the docs label Nov 7, 2024
@umartin
Copy link
Contributor Author

umartin commented Nov 7, 2024

I'm having trouble getting the tests to pass. TestPostgreSqlPlugin fails because the geometry type is not injected into PostgreSqlClient. I couldn't figure out how to fixed that.

@umartin
Copy link
Contributor Author

umartin commented Nov 7, 2024

It looks like the TestingConnectorContext used in TestPostgreSqlPlugin doesn't have the geometry type in the type manager. TestingConnectorContext is a final class so I can't extend it. Should I just create a TestingPostgreSqlConnectorContext with an extended type manager?

@umartin umartin changed the title [WIP] Add support for PostGIS Add support for PostGIS Nov 14, 2024
@umartin
Copy link
Contributor Author

umartin commented Nov 15, 2024

@ebyhr I think this PR is ready for review. All checks pass. I've also built and tested the trino docker image with postgis manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant