7phs commented on code in PR #1576: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1576#discussion_r1874399142
########## tests/sqlparser_redshift.rs: ########## @@ -353,3 +380,23 @@ fn test_parse_json_path_from() { _ => panic!(), } } + +#[test] +fn test_parse_select_numbered_columns() { + // An alias starting with a number + redshift_and_generic().verified_stmt(r#"SELECT 1 AS "1" FROM a"#); + redshift_and_generic().verified_stmt(r#"SELECT 1 AS "1abc" FROM a"#); +} + +#[test] +fn test_parse_nested_quoted_identifier() { + redshift().verified_stmt(r#"SELECT 1 AS ["1"] FROM a"#); + redshift().verified_stmt(r#"SELECT 1 AS [ " 1 " ]"#); Review Comment: I have updated the PR to trim spaces in cases of nested quotations, e.g., `[ "foo" ]` -> `["foo"]`. Implementing similar behavior for cases like `[ foo ]` would require more extensive changes to the existing code. In my opinion, this could introduce some risk, at least in the context of the current PR. -- 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