Skip to content

Commit 0037d8b

Browse files
committed
clippy
1 parent 1a85f68 commit 0037d8b

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/parser/mod.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8067,14 +8067,7 @@ impl<'a> Parser<'a> {
80678067
columns,
80688068
alias,
80698069
})
8070-
} else if self
8071-
.maybe_parse(|p| {
8072-
p.expect_token(&Token::AtSign)?;
8073-
p.expect_keyword(Keyword::SIGMA)?;
8074-
Ok(())
8075-
})
8076-
.is_some()
8077-
{
8070+
} else if self.parse_sigma_directive() {
80788071
self.expect_token(&Token::Period)?;
80798072
let element = self.parse_identifier(true)?;
80808073
let alias = self.parse_optional_table_alias(keywords::RESERVED_FOR_TABLE_ALIAS)?;
@@ -8135,6 +8128,15 @@ impl<'a> Parser<'a> {
81358128
}
81368129
}
81378130

8131+
pub fn parse_sigma_directive(&mut self) -> bool {
8132+
self.maybe_parse(|p| {
8133+
p.expect_token(&Token::AtSign)?;
8134+
p.expect_keyword(Keyword::SIGMA)?;
8135+
Ok(())
8136+
})
8137+
.is_some()
8138+
}
8139+
81388140
/// Parse a given table version specifier.
81398141
///
81408142
/// For now it only supports timestamp versioning for BigQuery and MSSQL dialects.

0 commit comments

Comments
 (0)