-
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
schemachanger: enable adding/dropping path of constraint name #90840
Closed
Xiang-Gu
wants to merge
2
commits into
cockroachdb:master
from
Xiang-Gu:enable_adding_and_dropping_of_constraint_name_element
Closed
schemachanger: enable adding/dropping path of constraint name #90840
Xiang-Gu
wants to merge
2
commits into
cockroachdb:master
from
Xiang-Gu:enable_adding_and_dropping_of_constraint_name_element
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xiang-Gu
force-pushed
the
enable_adding_and_dropping_of_constraint_name_element
branch
from
October 31, 2022 16:08
159e480
to
701b3eb
Compare
Xiang-Gu
force-pushed
the
enable_adding_and_dropping_of_constraint_name_element
branch
from
November 14, 2022 16:47
701b3eb
to
124085d
Compare
Xiang-Gu
force-pushed
the
enable_adding_and_dropping_of_constraint_name_element
branch
from
November 14, 2022 23:17
124085d
to
9c717b6
Compare
craig bot
pushed a commit
that referenced
this pull request
Nov 15, 2022
91704: *: Improve constraints retrieval in table descriptor r=Xiang-Gu a=Xiang-Gu This PR tries to improve how we retrieve constraints in a table descriptor. Previously, it was mostly legacy code carries over from a while ago and nothing hasn't really changed. The main change is to introduce `catalog.Constraint` interface, similar to `catalog.Index` and `catalog.Column`, as the preferred interface for constraint in this layer. Previously, we would directly expose the underlying protobuf descriptor. Commit 1 (easy): Rename `catalog.ConstraintToUpdate` to `catalog.Constraint`. It's good that we already have an interface that is suitable to be used for our effort. Commit 2 (easy): Added methods in just renamed `catalog.Constraint` interface for index-backed-constraints (i.e. PRIMARY KEY or UNIQUE); Commit 3 (easy): Let `tabledesc.index` struct implement `catalog.Constraint` interface as we will use it for index-backed-constraints. Commit 4 (easy): Add a method in `catalog.Constraint` that gets validity of the constraint. Commit 5 (moderate): Add logic (`ConstraintCache`) to pre-compute all constraints in a table, categorized by type and validity, so that we can readily retrieve them later. This is the same idea/technique used for managing index and columns (in `IndexCache` and `ColumnCache`). Commit 6 (easy): Introduce the new, preferred methods in `catalog.TableDescriptor` to retrieve constraints from a table. Commit 7 (easy): Refactor signature of the existing `FindConstraintWithID` method to use the newly added interface and retrieval methods. Informs: #90840 (this PR can unblock #90840) Release note: None 91867: ui: change height of column selector r=maryliag a=maryliag Previosuly, it was hard to identify there was more items on the columns selector, since the scrollbar is confugured by the user and might not show up right away (it will show once you hover with mouse and scroll). This commit changes the height of the filter, making part of the next options to show up, hinting there is more options when scrolling. Part Of #91763 Before <img width="322" alt="Screen Shot 2022-11-14 at 2 59 39 PM" src="https://user-images.githubusercontent.com/1017486/201755400-1276e45b-62b8-44c0-a7ff-c337090ad94a.png"> After <img width="308" alt="Screen Shot 2022-11-14 at 3 02 47 PM" src="https://user-images.githubusercontent.com/1017486/201755427-906e1c3b-e9fa-443b-9508-b2957b38d90b.png"> Release note (ui change): Change the height of column selector, so it can hint there are more options to be selected once scrolled. Co-authored-by: Xiang Gu <[email protected]> Co-authored-by: maryliag <[email protected]>
The old schema changer has the behavior of retaining the to-be-dropped check constraint on the `Checks` slice. We will do the same in the new schema changer.
ConstraintName element is deemed simple dependents of constraint and hence has transition between PUBLIC <==> ABSENT. This commit thus is primarily implementing the scop `SetConstraintName`.
Xiang-Gu
force-pushed
the
enable_adding_and_dropping_of_constraint_name_element
branch
from
November 15, 2022 15:29
9c717b6
to
65035fe
Compare
This is ready for a look! |
closing as it's now part of #91153 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable adding/dropping path of constraint name. It's considered
a simple dependent of constraint, so it transition directly between absent
and public.
Fixes #89665
Release note: None