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

*: ignore unknown hint and return warning instead of return a parser error #8685

Merged
merged 9 commits into from
Dec 21, 2018
Merged

*: ignore unknown hint and return warning instead of return a parser error #8685

merged 9 commits into from
Dec 21, 2018

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Dec 13, 2018

What problem does this PR solve?

using pingcap/parser#80 parser

Current, when we meet unknow hint token whole sql will be failure.

This PR will ignore whole hint when meet unknow token and run without hint, so we can compatible to SQL that generate by tool and target to other database.

What is changed and how it works?

use new parser that ignore hint parser error

Check List

Tests

  • Old Test

Code changes

  • Dependency

Side effects

  • N/A

Related changes

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

This change is Reviewable

@lysu
Copy link
Contributor Author

lysu commented Dec 13, 2018

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Dec 13, 2018

/run-unit-test

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu
Copy link
Contributor Author

lysu commented Dec 14, 2018

/run-all-tests

@lysu lysu requested a review from zz-jason December 14, 2018 14:18
@lysu
Copy link
Contributor Author

lysu commented Dec 18, 2018

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Dec 19, 2018

/run-unit-test

@XuHuaiyu XuHuaiyu changed the title using ignore hint when hint error version parser *: ignore unknown hint and return warning instead of return a parser error Dec 19, 2018
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

Do we need to add an integration test here?

@lysu
Copy link
Contributor Author

lysu commented Dec 21, 2018

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Dec 21, 2018

/run-unit-test

@lysu lysu added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 21, 2018
@lysu
Copy link
Contributor Author

lysu commented Dec 21, 2018

@XuHuaiyu commet addressed PTAL if free thx~

XuHuaiyu
XuHuaiyu previously approved these changes Dec 21, 2018
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu lysu added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Dec 21, 2018
@lysu
Copy link
Contributor Author

lysu commented Dec 21, 2018

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Dec 21, 2018

/run-unit-test

2 similar comments
@lysu
Copy link
Contributor Author

lysu commented Dec 21, 2018

/run-unit-test

@lysu
Copy link
Contributor Author

lysu commented Dec 21, 2018

/run-unit-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants