-
Notifications
You must be signed in to change notification settings - Fork 4.1k
geo/geogfn: implement ST_Perimeter({bool,geography}) #48401
Copy link
Copy link
Closed
Labels
A-geography-builtinsBuiltins which have geography as args.Builtins which have geography as args.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
Implement ST_Perimeter on arguments {bool,geography}, which should adopt PostGIS behaviour.
Observers: Please react to this issue if you need this functionality.
For Geography builtins, please do the following:
- Ideally add a relevant helper function in
pkg/geo/geogfn(parse and output related functions can go inpkg/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). - 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/geospatialto call this functionality at least once. You can callmake testbaselogic FILES='geospatial' TESTFLAGS='-rewrite'to regenerate the output. Tests here should just ensure the builtin is linked end to end (your exhaustive unit tests go the above mentioned packages!). - Ensure the documentation is regenerated by calling
make buildshort. You can also play with it by calling./cockroach demo --emptyafterwards. - Submit your PR - make sure to follow the guidelines from creating your first PR.
You can follow #48529 for an example PR.
🤖 This issue was synced with a spreadsheet by gsheets-to-github-issues by otan on 2020-06-30T05:28:55Z. Changes to titles, body and labels may be overwritten.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-geography-builtinsBuiltins which have geography as args.Builtins which have geography as args.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)