-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
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. Reviewer can indicate their review by submitting an approval review. |
19eaee9
to
1eafc82
Compare
1eafc82
to
2c89bf8
Compare
2c89bf8
to
5188617
Compare
/run-all-tests |
@@ -1180,6 +1180,13 @@ func (n *CreateTableStmt) Accept(v Visitor) (Node, bool) { | |||
} | |||
n.Partition = node.(*PartitionOptions) | |||
} | |||
for i, option := range n.Options { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
LGTM
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 <[email protected]>
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. Commit hash: 2793362
|
TiDB MergeCI notify🔴 Bad News! New failing [2] after this pr merged.
|
Signed-off-by: YangKeao [email protected]
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_UNIT
andTTL_ENABLE = 'ON'/'OFF'
.Besides that, this PR also adds
Visit
function forTableOption
, because anExpr
field was added to theTableOption
.Check List
Tests
Release note