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: various geospatial built-in fixes #113781
Conversation
rharding6373
commented
Nov 3, 2023
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 2 of 2 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @rharding6373)
pkg/sql/sem/builtins/geo_builtins.go
line 1133 at r1 (raw file):
ReturnType: tree.FixedReturnType(types.Geometry), Fn: func(_ context.Context, evalCtx *eval.Context, args tree.Datums) (tree.Datum, error) { if tree.DNull.Compare(evalCtx, args[0]) == 0{
[nit] Elsewhere we just directly compare args with tree.DNull
using ==
. Did you find a case where that doesn't work?
b284f2e
to
06f7265
Compare
Allows and adds support for NULL inputs for the st_pointfromgeohash and st_geomfromgeohash built-ins. Epic: None Informs: cockroachdb#111157 Release note (bug fix): Fixes null input handling for the geospatial built-ins st_pointfromgeohash and st_geomfromgeohash.
Postgis allows xmin/ymin to be greater than xmax/ymax respectively in st_makeenvelope, but the geom library does not allow this when converting Bounds to Polygon. Instead, we build the polygon explicitly from the provided min/max coordinates. Epic: None Fixes: cockroachdb#111157 Release note (bug fix): The geospatial st_makeenvelope built-in now correctly supports xmin or ymin to be greater than xmax or ymax, respectively.
06f7265
to
d929408
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.
TFTR!
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @DrewKimball)
pkg/sql/sem/builtins/geo_builtins.go
line 1133 at r1 (raw file):
Previously, DrewKimball (Drew Kimball) wrote…
[nit] Elsewhere we just directly compare args with
tree.DNull
using==
. Did you find a case where that doesn't work?
That's just how I happened to write it out. Thanks for the suggestion!
I created a new issue for the test failure, which is an unrelated randomized CDC test: #113842 |
TFTR! bors r+ |
Build succeeded: |