-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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/geomfn: implement ST_Buffer #49722
Conversation
23580a6
to
0cd25d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 9 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @otan)
pkg/geo/geomfn/buffer.go, line 50 at r1 (raw file):
// the BufferParams form. // The string must be of the same format as specified by https://postgis.net/docs/ST_Buffer.html. // Returns the BufferParams, as well as the modified distance.
does PostGIS support all these parameters for geography too?
pkg/sql/sem/builtins/geo_builtins.go, line 327 at r1 (raw file):
var stBufferWithParamsInfoBuilder = infoBuilder{ info: `Returns a Geometry that represents all points whose distance is less than or equal to the given distance.
... to the given distance from the given geometry.
pkg/sql/sem/builtins/geo_builtins.go, line 339 at r1 (raw file):
var stBufferWithQuadSegInfoBuilder = infoBuilder{ info: `Returns a Geometry that represents all points whose distance is less than or equal to the given distance.
ditto
pkg/sql/sem/builtins/geo_builtins.go, line 2015 at r1 (raw file):
{"geometry_str", types.String}, // This should be float, but for this to work equivalently to the psql type system, // we have to make a decimal definition.
is this the first time in CRDB that we are having to do this types.{Float,Decimal}
dance? And are there any thoughts on how we could get rid of this duplication in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)
pkg/geo/geomfn/buffer.go, line 50 at r1 (raw file):
Previously, sumeerbhola wrote…
does PostGIS support all these parameters for geography too?
Yep! But it has a hack to do it...coming soon!
pkg/sql/sem/builtins/geo_builtins.go, line 327 at r1 (raw file):
Previously, sumeerbhola wrote…
... to the given distance from the given geometry.
Done.
pkg/sql/sem/builtins/geo_builtins.go, line 339 at r1 (raw file):
Previously, sumeerbhola wrote…
ditto
Done.
pkg/sql/sem/builtins/geo_builtins.go, line 2015 at r1 (raw file):
Previously, sumeerbhola wrote…
is this the first time in CRDB that we are having to do this
types.{Float,Decimal}
dance? And are there any thoughts on how we could get rid of this duplication in the future?
there's been others. the work on implicit casts will resolve this, but that is kinda "off the table"for now...
bors r=summerbhola |
Merge conflict (retrying...) |
Merge conflict |
Implemented ST_Buffer. Had to write our own parsing logic to make it compatible with C. Also ran clang-format and fixed up a few bad infos. Release note (sql change): Implement ST_Buffer for geometry and string variants.
bors r=summerbhola |
Build succeeded |
Implemented ST_Buffer. Had to write our own parsing logic to make it
compatible with C.
Also ran clang-format and fixed up a few bad infos.
Resolves #48890
Resolves #48891
Resolves #48802
Resolves #48803
Resolves #48804
Release note (sql change): Implement ST_Buffer for geometry and string
variants.