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

Misleading error message for SQL typo #3471

Closed
tisonkun opened this issue Mar 10, 2024 · 1 comment · Fixed by #3817
Closed

Misleading error message for SQL typo #3471

tisonkun opened this issue Mar 10, 2024 · 1 comment · Fixed by #3817
Labels
C-user-experience Category User Experience

Comments

@tisonkun
Copy link
Collaborator

tisonkun commented Mar 10, 2024

What type of enhancement is this?

User experience

What does the enhancement do?

CREATE TABLE IF NOT EXIST t(`Hits` STRING NULL, ts TIMESTAMP(3) NOT NULL, TIME INDEX ("ts"));

throws:

ERROR 1815 (HY000): Missing time index constraint

But it's actually because IF NOT EXIST should be IF NOT EXISTS.

Implementation challenges

No response

@tisonkun
Copy link
Collaborator Author

This may not be trivial as it firstly looks like, since IF and EXISTS can be valid table name (NOT is invalid for PG but valid in sqlparser-rs by default).

Push #3472 to terminate parsing on invalid columns eagerly so we can have a much simpler context when considering this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-user-experience Category User Experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant