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

Parse generated columns in DDL #8117

Merged
merged 10 commits into from
May 13, 2021

Conversation

systay
Copy link
Collaborator

@systay systay commented May 13, 2021

Description

Adds parser support for generated columns.

Related Issues

Fixes #8110

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

References

https://dev.mysql.com/doc/refman/5.7/en/create-table.html
https://dev.mysql.com/doc/refman/8.0/en/create-table-generated-columns.html

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
…e, comment

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@systay systay marked this pull request as ready for review May 13, 2021 15:25
@systay systay requested a review from shlomi-noach May 13, 2021 15:25
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

The changes look good.
From the parser it looks like we now support generated columns in both CREATE and ALTER, however I don't see any tests for the ALTER case.

Signed-off-by: deepthi <deepthi@planetscale.com>
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

Added parser unit tests for alter. LGTM now.

@deepthi deepthi merged commit 8442df3 into vitessio:master May 13, 2021
@deepthi deepthi deleted the feat-generated-always branch May 13, 2021 20:32
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.

Vitess should support GENERATED for Online DDL.
5 participants