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

add support for ALTER TABLE ... RENAME COLUMN syntax #504

Merged
merged 2 commits into from
Aug 21, 2019

Conversation

tangwz
Copy link
Contributor

@tangwz tangwz commented Aug 19, 2019

What problem does this PR solve?

Fix ALTER TABLE ... RENAME COLUMN syntax

Issue: #462

MySQL Syntax:

alter_specification:
...
  | RENAME COLUMN old_col_name TO new_col_name
...

Bad SQL Case:

ALTER TABLE t RENAME COLUMN a TO b;

Check List

Tests

  • Unit test

@codecov
Copy link

codecov bot commented Aug 19, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@96e1f76). Click here to learn what that means.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #504   +/-   ##
=========================================
  Coverage          ?   71.59%           
=========================================
  Files             ?       32           
  Lines             ?     7723           
  Branches          ?        0           
=========================================
  Hits              ?     5529           
  Misses            ?     1670           
  Partials          ?      524
Impacted Files Coverage Δ
parser.go 70.58% <ø> (ø)
ast/ddl.go 80.17% <42.85%> (ø)

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 96e1f76...53b9b24. 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

parser.y Outdated Show resolved Hide resolved
@tangwz
Copy link
Contributor Author

tangwz commented Aug 20, 2019

@leoppro PTAL

Copy link
Contributor

@zier-one zier-one left a comment

Choose a reason for hiding this comment

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

LGTM

@zier-one zier-one added status/LGT2 LGT2 and removed status/LGT1 LGT1 labels Aug 21, 2019
@zier-one zier-one merged commit dd016b8 into pingcap:master Aug 21, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants