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

Adds Planning and Parsing Support for Create Index of MySQL 5.7 #7024

Merged
merged 14 commits into from
Nov 18, 2020

Conversation

GuptaManan100
Copy link
Member

@GuptaManan100 GuptaManan100 commented Nov 12, 2020

Adds Planning and Parsing Support for Create Index of MySQL 5.7

Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
@GuptaManan100 GuptaManan100 added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Parser labels Nov 12, 2020
Signed-off-by: GuptaManan100 <manan@planetscale.com>
@GuptaManan100 GuptaManan100 changed the title Adds Complete Parsing Support for all constructs of mysql 5.7 Adds Parsing Support for Create Index of mysql 5.7 Nov 13, 2020
@systay systay changed the title Adds Parsing Support for Create Index of mysql 5.7 Adds Parsing Support for Create Index of MySQL 5.7 Nov 13, 2020
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Copy link
Contributor

@shlomi-noach shlomi-noach 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. Unfortunately for me, I didn't consider CREATE INDEX when parsing online DDL; while it's a valid query, I only planned for ALTER TABLE. Moreover, gh-ost only supports ALTER TABLE form.

What I would like to consider is to have a func (*CreateIndex) ToAlterTable() *Statement function. Given the fields in CreateIndex struct I feel like this is reasonable to accomplish. What do you think?

Signed-off-by: GuptaManan100 <manan@planetscale.com>
@GuptaManan100
Copy link
Member Author

Yes, we can have that function for converting CREATE INDEX query to ALTER TABLE. For now the focus is on mysql compatibility and I will revisit this when the planning and parsing for other constructs is done too. I will add it to the TODO list https://github.com/vitessio/vitess/projects/7. Is that alright?

Signed-off-by: GuptaManan100 <manan@planetscale.com>
@shlomi-noach
Copy link
Contributor

I will add it to the TODO list

sounds good! I'm happy to author that change myself.

@GuptaManan100 GuptaManan100 changed the title Adds Parsing Support for Create Index of MySQL 5.7 Adds Planning and Parsing Support for Create Index of MySQL 5.7 Nov 16, 2020
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
@GuptaManan100 GuptaManan100 marked this pull request as ready for review November 16, 2020 09:42
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Comment on lines 142 to 145
"Keyspace": {
"Name": "user",
"Sharded": true
},
Copy link
Member

Choose a reason for hiding this comment

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

should this not be main keyspace?

Copy link
Member

Choose a reason for hiding this comment

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

I see it is fixed in next commit.

@harshit-gangal harshit-gangal merged commit 095e468 into vitessio:master Nov 18, 2020
@askdba askdba added this to the v9.0 milestone Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants