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

geo: implement ST_MakePoint({float8,float8,float8,float8}) -> geometry #48816

Closed
otan opened this issue May 13, 2020 · 1 comment
Closed

geo: implement ST_MakePoint({float8,float8,float8,float8}) -> geometry #48816

otan opened this issue May 13, 2020 · 1 comment
Labels
A-geometry-creation-builtins Builtins which have geometry as a return statement. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@otan
Copy link
Contributor

otan commented May 13, 2020

Implement ST_MakePoint on arguments {float8,float8,float8,float8}, which should adopt PostGIS behaviour.

For Geometry builtins, please do the following:

  • Ideally add a relevant helper function in pkg/geo. Add exhaustive unit tests here - you can run through example test cases and make sure that PostGIS and CRDB return the same result within a degree of accuracy (1cm for geography).
    • When using GEOS, you can reference the C API for which functions are available. Unfortunately, Windows is not currently supported when using GEOS.
  • Create a new builtin that references this function in pkg/sql/sem/builtins/geo_builtins.go. Note that we currently do not support optional arguments, so we define functions that have optional arguments once without the optional argument (using the default value in the optional position), and once with the optional argument.
  • Modify the tests in pkg/sql/logictest/testdata/logic_test/geospatial to call this functionality at least once. You can call make testbaselogic FILES='geospatial' TESTFLAGS='-rewrite' to regenerate the output manually. Tests here should just ensure the builtin is linked end to end.
  • Ensure the documentation is regenerated by calling make buildshort.
  • Submit your PR - make sure to follow the guidelines from creating your first PR.

You can follow #48441 for an example PR.

🤖 This issue was synced with a spreadsheet by gsheets-to-github-issues by otan on 2020-05-14T15:44:16Z. Changes to titles, body and labels may be overwritten.

@otan otan added A-geometry-creation-builtins Builtins which have geometry as a return statement. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) labels May 13, 2020
@otan
Copy link
Contributor Author

otan commented May 15, 2020

not supporting for now.

@otan otan closed this as completed May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-geometry-creation-builtins Builtins which have geometry as a return statement. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

1 participant