7phs commented on code in PR #1576: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1576#discussion_r1871857040
########## src/dialect/redshift.rs: ########## @@ -41,14 +41,48 @@ impl Dialect for RedshiftSqlDialect { /// treating them as json path. If there is identifier then we assume /// there is no json path. fn is_proper_identifier_inside_quotes(&self, mut chars: Peekable<Chars<'_>>) -> bool { Review Comment: It is a reasonable question! I verified what happened if `is_proper_identifier_inside_quotes` is removed and `[` is removed from RedShift dialect - a couple tests failed `brackets_over_db_schema_table_name_with_whites_paces` and `test_square_brackets_over_db_schema_table_name` + my new one. Both are related to an old fashion way of using `[` in RedShift. I verified that these queries work in RedShift and we can find it in query history or in end-user usages: 1. `SELECT 1 AS ["1"] FROM foo` 2. `SELECT [a] FROM [ schema ].[foo]` Perhaps, needs to add a special case for `[` in RedShift dialect instead of improving identifying a possible identifier inside quotes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org