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

support Geometry and Geography values as WKT strings #112

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

fengctor
Copy link
Member

@fengctor fengctor commented Apr 25, 2024

Allows us to use the WKT strings returned from Geometry and SphericalGeography expressions in queries like select st_point(0, 0) and select to_spherical_geography(st_point(0, 0)) (both giving "Point (0 0)"). This would previously result in a type not supported: "SphericalGeography" error.

Copy link

cla-bot bot commented Apr 25, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

trino/trino.go Outdated
@@ -1469,7 +1469,7 @@ func (c *typeConverter) ConvertValue(v interface{}) (driver.Value, error) {
return nil, err
}
return vv.Bool, err
case "json", "char", "varchar", "varbinary", "interval year to month", "interval day to second", "decimal", "ipaddress", "uuid", "unknown":
case "json", "char", "varchar", "varbinary", "interval year to month", "interval day to second", "decimal", "ipaddress", "uuid", "SphericalGeography", "unknown":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add Geometry here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I can also add that

Copy link

cla-bot bot commented Apr 25, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@fengctor fengctor changed the title support Geography values as WKT strings support Geometry and Geography values as WKT strings Apr 25, 2024
Copy link

cla-bot bot commented Apr 29, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

1 similar comment
Copy link

cla-bot bot commented Apr 29, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@fengctor
Copy link
Member Author

Hi @nineinchnick, it looks like I need help from someone with write access to get this merged.

@nineinchnick
Copy link
Member

I'm not a maintainer here, @wendigo @losipiuk PTAL

@wendigo wendigo merged commit fd368cb into trinodb:master Apr 29, 2024
5 checks passed
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.

None yet

3 participants