Skip to content
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

wip:*: Support sytax of reset placement options #1353

Closed
wants to merge 8 commits into from

Conversation

sylzd
Copy link
Contributor

@sylzd sylzd commented Sep 28, 2021

What problem does this PR solve?

Issue Number: pingcap/tidb#18203

related to pingcap/tidb#18203

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@sylzd
Copy link
Contributor Author

sylzd commented Sep 28, 2021

how can we split “default” (policy name) with default (keyword)? or we just support SET DEFAULT syntax?

@sylzd sylzd changed the title *: Support sytax of reset db placement options *: Support sytax of clear db placement options Sep 28, 2021
@sylzd sylzd changed the title *: Support sytax of clear db placement options *: Support sytax of reset db placement options Sep 28, 2021
ctx.WriteKeyWord("DEFAULT")
} else {
ctx.WriteName(n.StrValue)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want 'DEFAULT' and DEFAULT to be distinguishable you should create a separate PlacementOptionType. playing tricks in Restore() won't do much.

Copy link
Contributor Author

@sylzd sylzd Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also want to make `DEFAULT`(identifier) differs from DEFAULT (keyword) 🤣, does it work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. "DEFAULT" in parser.y always refer to the keyword. since DEFAULT is a reserved keyword it shouldn't collide with Identifier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great to me, I will try it.😆

@sylzd sylzd changed the title *: Support sytax of reset db placement options wip:*: Support sytax of reset db placement options Sep 28, 2021
@sylzd sylzd changed the title wip:*: Support sytax of reset db placement options wip:*: Support sytax of reset placement options Oct 9, 2021
@sylzd
Copy link
Contributor Author

sylzd commented Oct 17, 2021

merged to pingcap/tidb#28463 by pingcap/tidb#28257

@sylzd sylzd closed this Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants