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

CreateTable: DEFAULT CHARACTER SET missing #1331

Closed
fionera opened this issue Sep 4, 2022 · 7 comments
Closed

CreateTable: DEFAULT CHARACTER SET missing #1331

fionera opened this issue Sep 4, 2022 · 7 comments
Assignees

Comments

@fionera
Copy link

fionera commented Sep 4, 2022

When a Query contains a DEFAULT CHARACTER SET or a COLLATE its not available in the CreateTable function

@fulghum
Copy link
Contributor

fulghum commented Sep 6, 2022

Hey @fionera, thanks for checking out the go-mysql-server project. @Hydrocharged led the work for charsets and collations, so I'm assigning this one to him to help you out with.

It sounds like you're asking about where the charset/collation info goes after it's parsed, specifically for CreateTable, so that you can switch behavior on that?

@Hydrocharged
Copy link
Contributor

Hi @fionera! If I'm understanding your question correctly, when you use a COLLATE expression, it wraps the target expression in a CollatedExpression. Also, whenever setting a table's collation, it may be found here in the CreateTable node.

@fionera
Copy link
Author

fionera commented Sep 8, 2022

Ah Thank you! I wasnt on the main branch and didnt had the Collation yet. Now I am only missing a way to get the DEFAULT CHARACTER SET part of the query.

@zachmu zachmu transferred this issue from dolthub/go-mysql-server Oct 12, 2022
@zachmu
Copy link
Member

zachmu commented Oct 12, 2022

@Hydrocharged I think we support setting default character sets on tables, right? Can you do a pass and summarize what if anything is left to do here?

@timsehn
Copy link
Contributor

timsehn commented Oct 12, 2022

I think this might be a way to access that information in GMS, not Dolt related?

@Hydrocharged
Copy link
Contributor

I didn't quite understand the question. We support setting defaults on the table, and I pointed to it in my 2nd link. For clarification, I'm pointing to the collation, but the character set may be retrieved using collation.CharacterSet().

Since they didn't reply, I think we can assume that they may have figured that part out. I'm in favor of closing this for now, we can create another issue if my assumption is incorrect.

@zachmu zachmu transferred this issue from dolthub/dolt Oct 13, 2022
@zachmu
Copy link
Member

zachmu commented Oct 13, 2022

My mistake, this is indeed a go-mysql-server specfic issue.

@fionera please let us know if there's more to do here. Closing in the meantime.

@zachmu zachmu closed this as completed Oct 13, 2022
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

No branches or pull requests

5 participants