Add identifier unicode support in Mysql, Postgres and Redshift#1933
Merged
iffyio merged 3 commits intoapache:mainfrom Jul 14, 2025
Merged
Add identifier unicode support in Mysql, Postgres and Redshift#1933iffyio merged 3 commits intoapache:mainfrom
iffyio merged 3 commits intoapache:mainfrom
Conversation
iffyio
reviewed
Jul 11, 2025
Contributor
iffyio
left a comment
There was a problem hiding this comment.
Thanks @etgarperets, could you also take a look at the ci failure (and also to merge in latest from main as there are currently some conflicts on the branch)
Comment on lines
+15901
to
+16140
| let unicode_sql = r#"SELECT phoneǤЖשचᎯ⻩☯♜🦄⚛🀄ᚠ⌛🌀 tbl FROM customers"#; | ||
| let dialects_supporting_unicode = TestedDialects::new(vec![Box::new(MySqlDialect {}), Box::new(RedshiftSqlDialect {}), Box::new(PostgreSqlDialect {})]); | ||
| let _ = dialects_supporting_unicode.parse_sql_statements(unicode_sql).unwrap(); |
Contributor
There was a problem hiding this comment.
Suggested change
| let unicode_sql = r#"SELECT phoneǤЖשचᎯ⻩☯♜🦄⚛🀄ᚠ⌛🌀 tbl FROM customers"#; | |
| let dialects_supporting_unicode = TestedDialects::new(vec![Box::new(MySqlDialect {}), Box::new(RedshiftSqlDialect {}), Box::new(PostgreSqlDialect {})]); | |
| let _ = dialects_supporting_unicode.parse_sql_statements(unicode_sql).unwrap(); | |
| let sql = r#"SELECT phoneǤЖשचᎯ⻩☯♜🦄⚛🀄ᚠ⌛🌀 tbl FROM customers"#; | |
| let dialects = TestedDialects::new(vec![Box::new(MySqlDialect {}), Box::new(RedshiftSqlDialect {}), Box::new(PostgreSqlDialect {})]); | |
| let _ = dialects.verified_stmt(unicode_sql); |
| } | ||
|
|
||
| #[test] | ||
| fn test_unicode_support() { |
Contributor
There was a problem hiding this comment.
Suggested change
| fn test_unicode_support() { | |
| fn test_identifier_unicode_support() { |
|
|
||
| fn is_identifier_part(&self, ch: char) -> bool { | ||
| self.is_identifier_start(ch) || ch.is_ascii_digit() | ||
| self.is_identifier_start(ch) || ch.is_ascii_digit() || !ch.is_ascii() |
Contributor
There was a problem hiding this comment.
Can we add a comment to these highlighting that they implement unicode character support?
…o added a test for that
bdd6f57 to
c03a7d7
Compare
iffyio
approved these changes
Jul 14, 2025
Contributor
iffyio
left a comment
There was a problem hiding this comment.
LGTM! Thanks @etgarperets!
cc @alamb
ayman-sigma
pushed a commit
to sigmacomputing/sqlparser-rs
that referenced
this pull request
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…o added a test for that