-
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: handle CONSTRAINT...UNIQUE with PARTITION BY ALL / REGIONAL BY ROW #59364
Conversation
Release note (sql change): Fix-up ALTER TABLE ... ADD CONSTRAINT ... UNIQUE to partition correctly under a PARTITION ALL BY table.
Release note (sql change): This change teaches CRDB to apply zone configs to new unique constraints in REGIONAL BY ROW tables.
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.
Just one nit below.
Reviewed 2 of 2 files at r1, 2 of 2 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @otan)
pkg/ccl/logictestccl/testdata/logic_test/regional_by_row, line 207 at r2 (raw file):
statement ok ALTER TABLE regional_by_row_table ADD CONSTRAINT unique_b_a UNIQUE(b, a)
Nit: We're testing adding a unique constraint on ALTER
. Can we also test adding one on CREATE
?
pkg/ccl/logictestccl/testdata/logic_test/regional_by_row, line 207 at r2 (raw file): Previously, ajstorm wrote…
There already is one on (b) |
thanks bors r=ajstorm |
Build succeeded: |
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 @otan)
pkg/ccl/logictestccl/testdata/logic_test/regional_by_row, line 207 at r2 (raw file):
Previously, otan (Oliver Tan) wrote…
There already is one on (b)
Isn't there just a unique index on b
? Are unique
constraints and unique
indexes handle identically under the covers?
pkg/ccl/logictestccl/testdata/logic_test/regional_by_row, line 207 at r2 (raw file): Previously, ajstorm wrote…
in CRDB they are treated the same (as of writing) |
sql: teach ADD UNIQUE CONSTRAINT to respect PARTITION ALL BY
Release note (sql change): Fix-up ALTER TABLE ... ADD CONSTRAINT ...
UNIQUE to partition correctly under a PARTITION ALL BY table.
sql: respect REGIONAL BY ROW when adding a new UNIQUE CONSTRAINT
Release note (sql change): This change teaches CRDB to apply zone
configs to new unique constraints in REGIONAL BY ROW tables.