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

opt: fix error in case of casted NULL arguments to AddGeometryColumn #51226

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

rytaft
Copy link
Collaborator

@rytaft rytaft commented Jul 9, 2020

This commit fixes an error that occurred when AddGeometryColumn was
called with NULL arguments that were cast to the type specified by the
function signature. #50992 already fixed the case when AddGeometryColumn
was called with bare NULL arguments, since those were detected by TypeCheck.
TypeCheck does not detect NULL arguments if they are cast to the correct
type.

This commit fixes the error by adding an explicit check in the optbuilder
that each argument is not null before calling the SQLFn of the
AddGeometryColumn overload.

Informs #50296

Release note (bug fix): Fixed an internal error that occurred when
AddGeometryColumn was called with NULL arguments. This now results in
a no-op and returns NULL.

This commit fixes an error that occurred when AddGeometryColumn was
called with NULL arguments that were cast to the type specified by the
function signature. cockroachdb#50992 already fixed the case when AddGeometryColumn
was called with bare NULL arguments, since those were detected by TypeCheck.
TypeCheck does not detect NULL arguments if they are cast to the correct
type.

This commit fixes the error by adding an explicit check in the optbuilder
that each argument is not null before calling the SQLFn of the
AddGeometryColumn overload.

Informs cockroachdb#50296

Release note (bug fix): Fixed an internal error that occurred when
AddGeometryColumn was called with NULL arguments. This now results in
a no-op and returns NULL.
@rytaft rytaft requested review from otan, RaduBerinde and a team July 9, 2020 16:39
@rytaft rytaft requested a review from a team as a code owner July 9, 2020 16:39
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rytaft
Copy link
Collaborator Author

rytaft commented Jul 9, 2020

TFTRs!

bors r+

@craig
Copy link
Contributor

craig bot commented Jul 9, 2020

Build succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants