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

Support Modify Column for MySQL dialect #1216

Merged
merged 2 commits into from
Apr 21, 2024
Merged

Support Modify Column for MySQL dialect #1216

merged 2 commits into from
Apr 21, 2024

Conversation

KKould
Copy link
Contributor

@KKould KKould commented Apr 13, 2024

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

Hi @KKould! could you add tests to mysql demonstrating the behavior?

@KKould
Copy link
Contributor Author

KKould commented Apr 14, 2024

Hi @KKould! could you add tests to mysql demonstrating the behavior?

thank you for the reminder, please check again

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

Thanks @KKould! Left a comment re the column keyword, other than that the changes look reasonable to me

options,
column_position,
} => {
write!(f, "MODIFY COLUMN {col_name} {data_type}")?;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems we'll need to track whether the COLUMN keyword was specified? Otherwise the following wont fulfill round trip ALTER TABLE foo MODIFY mycolumn int since the serialized version becomes ALTER TABLE foo MODIFY COLUMN mycolumn int

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I see, yeah no need to tackle that one in this PR unless you feel its straight-forward and want to. for this PR main would be to ensure the behavior for modify column

Copy link
Contributor

Choose a reason for hiding this comment

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

@KKould double checking: did you plan to update the PR for the MODIFY COLUMN variant introduced?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KKould double checking: did you plan to update the PR for the MODIFY COLUMN variant introduced?

nope

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree it would be great to ensure this type of syntax roundtrips but no need to do it in this PR

@KKould KKould requested a review from iffyio April 17, 2024 12:24
@iffyio
Copy link
Contributor

iffyio commented Apr 17, 2024

cc @alamb changes LGTM for review

options,
column_position,
} => {
write!(f, "MODIFY COLUMN {col_name} {data_type}")?;
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree it would be great to ensure this type of syntax roundtrips but no need to do it in this PR

@alamb alamb merged commit 7b49c69 into apache:main Apr 21, 2024
10 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8679082248

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 63 of 65 (96.92%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 88.113%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/ddl.rs 10 12 83.33%
Totals Coverage Status
Change from base Build 8660968190: 0.02%
Covered Lines: 21348
Relevant Lines: 24228

💛 - Coveralls

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

Successfully merging this pull request may close these issues.

4 participants