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

parser: support SQL_TSI_* #495

Merged
merged 3 commits into from
Aug 19, 2019
Merged

parser: support SQL_TSI_* #495

merged 3 commits into from
Aug 19, 2019

Conversation

ichn-hu
Copy link
Contributor

@ichn-hu ichn-hu commented Aug 18, 2019

What problem does this PR solve?

Fix #480 , adding SQL_TSI_* support to TimestampUnit, make it compatible with MySQL

What is changed and how it works?

Changed the yacc file to add these additional tokens, and replicated the original TimestampUnit interval node in the AST, since SQL_STI_* is essentially an alias to these interval tokens.

Check List

Tests

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

Code changes

N/A

Side effects

N/A

Related changes

N/A

@CLAassistant
Copy link

CLAassistant commented Aug 18, 2019

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Aug 18, 2019

Codecov Report

Merging #495 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #495   +/-   ##
=======================================
  Coverage   71.48%   71.48%           
=======================================
  Files          32       32           
  Lines        7672     7672           
=======================================
  Hits         5484     5484           
  Misses       1667     1667           
  Partials      521      521
Impacted Files Coverage Δ
parser.go 70.58% <ø> (ø) ⬆️
misc.go 96.42% <ø> (ø) ⬆️
ast/misc.go 74.05% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5d6ce8...b2bbe00. Read the comment docs.

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

LGTM

@kennytm kennytm added the status/LGT1 LGT1 label Aug 18, 2019
Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

@tangenta tangenta added status/LGT2 LGT2 and removed status/LGT1 LGT1 labels Aug 19, 2019
@tangenta
Copy link
Contributor

@ichn-hu Thanks for your contribution! Could you resolve the conflicts please?

@ichn-hu
Copy link
Contributor Author

ichn-hu commented Aug 19, 2019

@ichn-hu Thanks for your contribution! Could you resolve the conflicts please?

Yes of course, will do it right away, thanks for recognizing my contribution.

@zier-one zier-one merged commit 2b96673 into pingcap:master Aug 19, 2019
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
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.

Fix SQL_TSI_* syntax
5 participants