parser: add syntax for ttl option in ddl#39277
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
19eaee9 to
1eafc82
Compare
1eafc82 to
2c89bf8
Compare
2c89bf8 to
5188617
Compare
|
/run-all-tests |
parser/ast/ddl.go
Outdated
There was a problem hiding this comment.
Is it required by the PR? I think it is right to visit all the Options for CreateTableStmt.Accept. But I'm not sure why we did not do it before, maybe just because forgot it?
There was a problem hiding this comment.
Is it required by the PR?
Yes. The parser_test.go requires to visit all ExprNode to reset the offset. Without it, we cannot use the unit test utilities. This PR adds a ExprNode field to the option, so it's needed to visit the options.
faf7483 to
5188617
Compare
|
/run-all-tests |
5188617 to
cf520db
Compare
|
/run-all-tests |
|
/run-unit-test |
cf520db to
8dff386
Compare
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
8dff386 to
2793362
Compare
|
/run-check_dev_2 |
|
/run-unit-test |
|
/run-check_dev_2 |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 2793362 |
TiDB MergeCI notify🔴 Bad News! New failing [2] after this pr merged.
|
Signed-off-by: YangKeao yangkeao@chunibyo.icu
What problem does this PR solve?
Issue Number: close #39268
Problem Summary:
In #39264 we drafted an RFC for row level ttl. This PR adds the parser support for it.
What is changed and how it works?
This PR modifies the yacc files to support setting
TTL = column + INTERVAL expr TIME_UNITandTTL_ENABLE = 'ON'/'OFF'.Besides that, this PR also adds
Visitfunction forTableOption, because anExprfield was added to theTableOption.Check List
Tests
Release note