Skip to content

Support direct placement as table_options #26581

Closed
pingcap/parser
#1327
@morgo

Description

This is a sub-task of Placement Rules in SQL: #18030

This requires the following subtasks:

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 in SHOW CREATE TABLE #27792
  • Ensure that table_options respect "Policy Validation" and "Skipping Policy Validation" sections of proposal.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions