-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
builtins: add missing UnwrapDatum call and change panics to error #49601
Conversation
Not sure how to add a test for this, would appreciate any suggestions. |
DOidWrapper is only used for Names. Try passing a Name into one of these casts, maybe? |
Done |
Friendly ping |
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.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @asubiotto and @jordanlewis)
pkg/sql/logictest/testdata/logic_test/pg_builtins, line 18 at r1 (raw file):
0 # Regression test for https://github.com/cockroachdb/cockroach/issues/49072.
nit: I think we tend to use short form #49072
.
LGTM, thanks for adding the test! |
getNameForArg does not handle tree.DOidWrappers. The assumption in this code is that the datum gets unwrapped before calling this code. This commit adds a missing UnwrapDatum call and changes an unhandled type panic to an error instead. Release note (bug fix): a panic observed as "unexpected arg type tree.DOidWrapper" has been fixed.
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.
TFTRs
bors r=yuzefovich,jordanlewis
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis)
Build succeeded |
getNameForArg does not handle tree.DOidWrappers. The assumption in this code is
that the datum gets unwrapped before calling this code. This commit adds a
missing UnwrapDatum call and changes an unhandled type panic to an error
instead.
Release note (bug fix): a panic observed as "unexpected arg type
tree.DOidWrapper" has been fixed.
Closes #43166