aharpervc commented on code in PR #1809: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1809#discussion_r2050836373
########## src/dialect/mssql.rs: ########## @@ -116,7 +116,29 @@ impl Dialect for MsSqlDialect { true } - fn is_column_alias(&self, kw: &Keyword, _parser: &mut Parser) -> bool { + fn is_column_alias(&self, kw: &Keyword, parser: &mut Parser) -> bool { + // if: + // - keyword is `GO`, and + // - looking backwards there's only (any) whitespace preceded by a newline + // then: `GO` iSN'T a column alias + if kw == &Keyword::GO { + let mut look_back_count = 2; Review Comment: It's similar to parse_go, which references the existing previous token logic which also starts by subtracting 2. My understanding is that 0 is the next token, -1 is the current token, and -2 is the first previous token. -- 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