alamb commented on code in PR #1678: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1678#discussion_r1930891982
########## src/dialect/mod.rs: ########## @@ -821,11 +821,24 @@ pub trait Dialect: Debug + Any { false } + /// Returns reserved keywords when looking to parse column + /// identifiers. + /// i.e. (unquoted) words that may not be used as column identifiers + /// for the dialect. + /// For example given: `SELECT <col> AS <alias> FROM T`. The returned + /// keywords are not allowed in `<col>` and `<alias>` + fn get_reserved_keywords_for_column_identifier(&self) -> &'static [Keyword] { Review Comment: I agree this would be nice -- perhaps we can do so in a follow on PR ########## tests/sqlparser_bigquery.rs: ########## @@ -213,6 +213,15 @@ fn parse_raw_literal() { ); } +#[test] +fn parse_big_query_non_reserved_column_alias() { + let sql = r#"SELECT OFFSET, EXPLAIN, ANALYZE, SORT, TOP, VIEW FROM T"#; Review Comment: 🤯 -- 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