Port 'geometry_nearest_points' UDF#8280
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
There was a problem hiding this comment.
Since the function always returns two points, it would be more natural to return a row(geometry, geometry) (with each element being a point) instead of an array containing two elements.
There was a problem hiding this comment.
@martint Good point. But it’s a port of the existing functionality and I tried to keep the original code of the author as much as it possible
There was a problem hiding this comment.
@martint I've changed the function in order to return a row(geometry, geometry) . Please check it out :)
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
4dc437a to
613a893
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
I've already sent the email with signed CLA. Please check it out. |
613a893 to
5174f9e
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
@cla-bot check |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
This should go in the "Operations" section above. Also, make sure to place in the correct alphabetical position.
There was a problem hiding this comment.
Move this below the if (leftGeometry.isEmpty() || rightGeometry.isEmpty()) { check below to avoid constructing these objects in the case of empty input geometries.
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
Seems my CLA still not accepted . |
That's because the author of one of the commits is not in the CLA database. Ignore that for now. We've received your CLA and have added it to the tooling. |
@martint As far as I propose the port of the existed in PrestoDB functionality, the author of the one of commits is the original author of the prestodb/presto#14923 I've made following commit in order to save the name of the original author : |
Extracted-From: prestodb/presto#14923
c333676 to
835c681
Compare
The port of the 'geometry_nearest_points' UDF from PrestoDB
The 'geometry_nearest_points' function returns the points on each geometry nearest the other. If either geometry is empty, return
NULL. Otherwise, return an array of two Points that have the minimum distance of any two points on the geometries. The first Point will be from the first Geometry argument, the second from the second Geometry argument. If there are multiple pairs with the minimum distance, one pair is chosen arbitrarily.Extracted-From: https://github.com/prestodb/presto/pull/14923