sql/schemachanger: add support for setting schema of enum types#168255
sql/schemachanger: add support for setting schema of enum types#168255bghal wants to merge 1 commit intocockroachdb:masterfrom
Conversation
|
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
Detected infrastructure failure (matched: self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link) |
|
Detected infrastructure failure (matched: ). Automatically rerunning failed jobs. (run link) |
07358c4 to
de4be8f
Compare
|
Detected infrastructure failure (matched: ). Automatically rerunning failed jobs. (run link) |
1 similar comment
|
Detected infrastructure failure (matched: ). Automatically rerunning failed jobs. (run link) |
de4be8f to
0721c1c
Compare
|
Detected infrastructure failure (matched: self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link) |
|
Detected infrastructure failure (matched: ). Automatically rerunning failed jobs. (run link) |
0721c1c to
6f06e3b
Compare
|
Detected infrastructure failure (matched: ). Automatically rerunning failed jobs. (run link) |
|
Detected infrastructure failure (matched: ). Automatically rerunning failed jobs. (run link) |
1 similar comment
|
Detected infrastructure failure (matched: ). Automatically rerunning failed jobs. (run link) |
eaa1537 to
c6c78e5
Compare
f8b1dfe to
86734ff
Compare
…escriptors The schema ID field was not being set when walked over for an update because of a silent fallthrough. This caused inconsistencies between the descriptor and the namespace entry. The change handles the table desc case and adds an error-default to prevent any future silent fallthroughs. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
…escriptors The schema ID field was not being set when walked over for an update because of a silent fallthrough. This caused inconsistencies between the descriptor and the namespace entry. The change adds an error-default that exposes the silent fallthrough and handling for the table descriptor's update. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
…escriptors The schema ID field was not being set when walked over for an update because of a silent fallthrough. This caused inconsistencies between the descriptor and the namespace entry. The change adds an error-default that exposes the silent fallthrough and handling for the table descriptor's update. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
…iptors The schema ID field was not being set when walked over for an update because of a silent fallthrough; another op was updating the field. The change adds an error-default that exposes the silent fallthrough and refactors handling of the table descriptor's update to the expected place. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
In cases of a name collisions of a companion array type when changing a type's schema, the schemachanger was not handling it well. This change addresses that and adds a test. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
86734ff to
6d62376
Compare
|
Detected infrastructure failure (matched: self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link) |
In cases of a name collisions of a companion array type when changing a type's schema, the schemachanger was not handling it well. This change addresses that and adds a test. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
In cases of a name collisions of a companion array type when changing a type's schema, the schemachanger was not handling it well. This change addresses that and adds a test. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
6d62376 to
1cb0aaa
Compare
spilchen
left a comment
There was a problem hiding this comment.
just a few minor comments/suggestions.
@spilchen reviewed all commit messages and made 3 comments.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on bghal).
pkg/sql/alter_type.go line 378 at r1 (raw file):
// The CheckObjectNameCollision checks that the companion array can be moved // with its name.
nit: suggest rewording
Suggestion:
// without a name collision.pkg/sql/schemachanger/scbuild/internal/scbuildstmt/alter_type.go line 318 at r1 (raw file):
DescriptorType: "type", }) b.LogEventForExistingPayload(newSchemaChild, &eventpb.AlterType{
is the event for AlterType needed? We already have the SetSchema event. Looking at the legacy codepath, we only log a single event (SetSchema).
1cb0aaa to
e3b9f20
Compare
bghal
left a comment
There was a problem hiding this comment.
@bghal made 1 comment and resolved 1 discussion.
Reviewable status:complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on spilchen).
pkg/sql/schemachanger/scbuild/internal/scbuildstmt/alter_type.go line 318 at r1 (raw file):
Previously, spilchen wrote…
is the event for AlterType needed? We already have the SetSchema event. Looking at the legacy codepath, we only log a single event (SetSchema).
Done.
bf7878b to
c37dc0a
Compare
The schemachanger was logging a general `alter_type` event and a particular `set_schema` event. This change removes the duplicative logging. Part of: cockroachdb#164216 See: cockroachdb#57741 Supports: cockroachdb#168255 Epic: CRDB-31325 Release note: None
bghal
left a comment
There was a problem hiding this comment.
@bghal made 1 comment.
Reviewable status:complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on spilchen).
pkg/sql/schemachanger/scbuild/internal/scbuildstmt/alter_type.go line 318 at r1 (raw file):
Previously, bghal (Brendan) wrote…
Done.
Actually there's a bug in the legacy that dual logs. Fixed legacy in #169780.
The schemachanger was logging a general `alter_type` event and a particular `set_schema` event. This change removes the duplicative logging. Part of: cockroachdb#164216 See: cockroachdb#57741 Supports: cockroachdb#168255 Epic: CRDB-31325 Release note: None
c37dc0a to
3f9b3af
Compare
|
Detected infrastructure failure (matched: self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link) |
3f9b3af to
24c24ce
Compare
|
/trunk merge |
This change implements support for changing the schema of enum UDTs and rewires the command to it. Closes: cockroachdb#164216 Epic: CRDB-31325 Release note: None
24c24ce to
f1a7a14
Compare
|
Detected infrastructure failure (matched: self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link) |
This change implements support for changing the
schema of enum UDTs and rewires the command to it.
Closes: #164216
Epic: CRDB-31325
Release note: None