BigQuery support inline comment with hash syntax (#1192)

This commit is contained in:
Ifeanyi Ubah 2024-04-07 14:31:04 +02:00 committed by GitHub
parent 23103302e6
commit 732e1ec1fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -984,7 +984,7 @@ impl<'a> Tokenizer<'a> {
}
'{' => self.consume_and_return(chars, Token::LBrace),
'}' => self.consume_and_return(chars, Token::RBrace),
'#' if dialect_of!(self is SnowflakeDialect) => {
'#' if dialect_of!(self is SnowflakeDialect | BigQueryDialect) => {
chars.next(); // consume the '#', starting a snowflake single-line comment
let comment = self.tokenize_single_line_comment(chars);
Ok(Some(Token::Whitespace(Whitespace::SingleLineComment {