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

Unquoted identifiers naming rule is incorrect #1197

Open
jayzhan211 opened this issue Mar 29, 2024 · 0 comments
Open

Unquoted identifiers naming rule is incorrect #1197

jayzhan211 opened this issue Mar 29, 2024 · 0 comments

Comments

@jayzhan211
Copy link
Contributor

The naming rule is in https://dev.mysql.com/doc/refman/8.0/en/identifiers.html

The rule for unquoted identifiers is incorrect.

  • ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)
  • Extended: U+0080 .. U+FFFF

In the following test, we can see that @ is unpermitted
https://github.com/sqlparser-rs/sqlparser-rs/blob/44727891713114b72546facf21a335606380845a/tests/sqlparser_mysql.rs#L1661

I think we need to fix the unquoted identifiers for MYSQL and HIVE
https://github.com/sqlparser-rs/sqlparser-rs/blob/44727891713114b72546facf21a335606380845a/src/tokenizer.rs#L803-L811

MYSQL
https://github.com/sqlparser-rs/sqlparser-rs/blob/44727891713114b72546facf21a335606380845a/src/dialect/mysql.rs#L28-L41

HIVE
https://github.com/sqlparser-rs/sqlparser-rs/blob/44727891713114b72546facf21a335606380845a/src/dialect/hive.rs#L28-L36

@jayzhan211 jayzhan211 changed the title Unquoted identifiers name are incorrect Unquoted identifiers naming rule is incorrect Mar 29, 2024
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

1 participant