-
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
tree: correctly format the "unknown" oid for pg compatibility #118587
Conversation
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 3 of 3 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @rytaft)
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 3 of 3 files at r1, all commit messages.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @rytaft)
TFTRs! I ended up having to make some changes to the places where we generate datums for tests, as well. |
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 5 of 5 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @rytaft)
1b3abd8
to
b10edcb
Compare
After wrestling with tests for a bit, I've changed the approach. I removed the old (incomplete) handling of "unknown" oids. We now only output the |
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 1 of 5 files at r2, 12 of 12 files at r3, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 2 stale) (waiting on @DrewKimball, @mgartner, @michae2, and @rytaft)
pkg/sql/logictest/testdata/logic_test/pgoidtype
line 702 at r3 (raw file):
INSERT INTO t118273 VALUES (0, 0); skipif config local-mixed-23.1
nit: I think you can mention multiple configs to skip on a single line.
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.
nice!
Reviewed 1 of 5 files at r2, 12 of 12 files at r3, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 2 stale) (waiting on @DrewKimball, @mgartner, @michae2, and @rytaft)
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! 0 of 0 LGTMs obtained (and 3 stale) (waiting on @mgartner, @michae2, @rafiss, @rytaft, and @yuzefovich)
pkg/sql/logictest/testdata/logic_test/pgoidtype
line 702 at r3 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
nit: I think you can mention multiple configs to skip on a single line.
TIL, thanks.
@DrewKimball should we push it over the finish line? We just got another failure like this over in #122817 |
Sorry, I lost track of this one. I'll rebase. |
The `REGTYPE`, `REGPROC`, `REGCLASS`, and `REGNAMESPACE` types are all in the oid type family, but unlike `OID`, display `-` instead of `0` when the value is zero. Previously, this was handled by setting the `name` field of `DOid` to `-`, but the handling was incomplete. This commit removes the old special cases, and instead adds special handling to the functions that parse an oid from a string, as well as the `DOid.Format()` method. This way, correctly formatting the "unknown" oid doesn't rely on remembering to set the `name` field. In addition, this commit modifies some of the random datum generation logic to create types other than the canonical `T_oid`, like `T_regrole`. Fixes cockroachdb#118273 Release note: None
TFTRs! bors r+ |
blathers backport release-24.1 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from a4b6234 to blathers/backport-release-24.1-118587: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-24.1 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
blathers backport release-23.2 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from a4b6234 to blathers/backport-release-23.2-118587: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-23.2 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
blathers backport release-23.1 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from a4b6234 to blathers/backport-release-23.1-118587: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch release-23.1 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
The
REGTYPE
,REGPROC
,REGCLASS
, andREGNAMESPACE
types are allin the oid type family, but unlike
OID
, display-
instead of0
whenthe value is zero. Previously, this was handled by setting the
name
fieldof
DOid
to-
, but the handling was incomplete. This commit removes theold special cases, and instead adds special handling to the functions that
parse an oid from a string, as well as the
DOid.Format()
method. This way,correctly formatting the "unknown" oid doesn't rely on remembering to set
the
name
field.In addition, this commit modifies some of the random datum generation
logic to create types other than the canonical
T_oid
, likeT_regrole
.Fixes #118273
Release note: None