Description
This is a sub-task of Placement Rules in SQL: #18030
This requires the following subtasks:
- *: support new placement rules syntax parser#1299
parser: Support the following as table_options inCREATE|ALTER TABLE
andCREATE|ALTER DATABASE
contexts. This should also work for partitions, such asALTER TABLE t PARTITION p0
.
table_option: {
..
| FOLLOWERS [=] n
| VOTERS [=] n
| LEARNERS [=] n
| PRIMARY_REGION [=] "str"
| REGIONS [=] "str"
| SCHEDULE [=] "str"
| CONSTRAINTS [=] "str"
| FOLLOWER_CONSTRAINTS [=] "str"
| VOTER_CONSTRAINTS [=] "str"
| LEARNER_CONSTRAINTS [=] "str"
| PLACEMENT POLICY [=] "str"
}
- After the support of new syntax for parser, the old syntax should be removed.
- Ensure that table_options are persisted in TiDB DDL
- Ensure the database_options for placement are persisted in TiDB DDL
- Ensure the partitionDef options (usually stored as tableOption in ast) for placement are persisted in TiDB DDL
- And visible in
SHOW CREATE TABLE
but always enclosed in a version specific comment (/*T![placement]
). executor: Add support for placement inSHOW CREATE TABLE
#27792 - Ensure that table_options respect "Policy Validation" and "Skipping Policy Validation" sections of proposal.
Metadata
Assignees
Labels
No labels