-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: add proper telemetry for arrays of JSON #35704
Conversation
2f9e021
to
c04ff44
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @justinj, @knz, and @RaduBerinde)
pkg/sql/coltypes/arrays.go, line 52 at r1 (raw file):
// canBeInArrayColType returns true if the given T is a valid // element type for an array column type.
I think the issueNum, while fairly self-explanatory, could be mentioned in this comment.
Arrays of JSON are not supported but the errors did not link attempted uses to issue cockroachdb#23468. This patch fixes it. Release note: None
c04ff44
to
f01a4ba
Compare
Good idea! Done. |
TFYR! bors r+ |
Build failed |
failed on #35549 |
35714: sql,opt: enrich the reported errors, avoid "naked" panics r=knz a=knz First commit from #35704. Informs https://github.com/cockroachlabs/registration/issues/203. The `optbuilder` package's error handling was deficient in two ways: - it would fail assertions with a hard panic and cause a node shutdown; - it did not enrich errors with a suitable pg error code in many cases, including missing references to issues that track unimplemented features. This patch fixes the former by introducing a new primitive `assertionErrorf` that creates a pgerror with CodeInternalError (this is picked up in telemetry automatically). It fixes the latter by adding the missing error codes. Where applicable, errors have been either picked from the HP code, or from PostgreSQL. In the latter cases the code was also backported to the HP for consistency. Additionally, a linter is added to prevent the addition of new undecorated panics. Release note: None Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
Arrays of JSON are not supported but the errors did not
link attempted uses to issue #23468. This patch fixes it.