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

ddl: Support the operation of adding multi-columns #15540

Merged
merged 47 commits into from
Apr 8, 2020

Conversation

gauss1314
Copy link
Contributor

@gauss1314 gauss1314 commented Mar 21, 2020

UCP #5092

What problem does this PR solve?

Issue Number: close #5092

What is changed and how it works?

Support add multi-columns :

ALTER TABLE tbl_name
    [alter_specification [, alter_specification] ...]

alter_specification:
| ADD [COLUMN] (col_name column_definition,...)
| ADD [COLUMN] col_name column_definition

Support drop multi-columns:

ALTER TABLE tbl_name
    [alter_specification [, alter_specification] ...]

alter_specification:
| DROP [COLUMN] col_name

Check List

Tests

  • Unit test

@gauss1314 gauss1314 requested review from a team as code owners March 21, 2020 01:32
@sre-bot
Copy link
Contributor

sre-bot commented Mar 21, 2020

Thanks for your contribution. If your PR get merged, you will be rewarded 2996 points.

@ghost ghost requested review from SunRunAway, wshwsh12, francis0407 and winoros and removed request for a team March 21, 2020 01:32
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Mar 21, 2020
@codecov
Copy link

codecov bot commented Mar 22, 2020

Codecov Report

Merging #15540 into master will decrease coverage by 0.0796%.
The diff coverage is 100.0000%.

@@               Coverage Diff                @@
##             master     #15540        +/-   ##
================================================
- Coverage   80.7828%   80.7032%   -0.0796%     
================================================
  Files           504        504                
  Lines        137070     136489       -581     
================================================
- Hits         110729     110151       -578     
+ Misses        17854      17845         -9     
- Partials       8487       8493         +6     

@gauss1314 gauss1314 changed the title ddl: [WIP]Support the operation of adding multi-columns ddl: Support the operation of adding multi-columns Mar 22, 2020
@gauss1314
Copy link
Contributor Author

@zimulala PTAL

@zimulala
Copy link
Contributor

@gauss1314
CI check_dev is failed. I think you need to do make tidy or GO111MODULE=on go mod tidy in your local tidb directory. Add and commit these modifications, then push this branch again.

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

Do you want to support the statement like alter table t add column b int after a, add column c int after b;? If necessary, please add some tests similar to this type of statement, otherwise, please add checks to prevent the execution of such statements.

ddl/ddl_api.go Outdated Show resolved Hide resolved
ddl/ddl_api.go Outdated Show resolved Hide resolved
ddl/ddl_api.go Outdated Show resolved Hide resolved
ddl/ddl_api.go Show resolved Hide resolved
@zimulala
Copy link
Contributor

PTAL @tangenta @crazycs520 @bb7133

ddl/column.go Outdated Show resolved Hide resolved
ddl/column.go Outdated Show resolved Hide resolved
Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

@zimulala zimulala added status/LGT3 The PR has already had 3 LGTM. status/can-merge Indicates a PR has been approved by a committer. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Apr 8, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 8, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 8, 2020

@gauss1314 merge failed.

@zimulala
Copy link
Contributor

zimulala commented Apr 8, 2020

/run-integration-copr-test

@gauss1314
Copy link
Contributor Author

/run-all-tests

@zimulala zimulala merged commit c2538fa into pingcap:master Apr 8, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 8, 2020

Team gauss1314 complete task #5092 and get 2996 score, currerent score 3496

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. require-LGT3 Indicates that the PR requires three LGTM. sig/execution SIG execution sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UCP: Support the operation of adding multi-columns
5 participants