Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
7phs committed Oct 4, 2024
1 parent 85d09b5 commit 80f7aea
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8192,19 +8192,14 @@ impl<'a> Parser<'a> {
/// Parses a column definition within a view.
fn parse_view_column(&mut self) -> Result<ViewColumnDef, ParserError> {
let name = self.parse_identifier(false)?;
let mut options = vec![];
if (dialect_of!(self is BigQueryDialect | GenericDialect)
let options = if (dialect_of!(self is BigQueryDialect | GenericDialect)
&& self.parse_keyword(Keyword::OPTIONS))
|| (dialect_of!(self is SnowflakeDialect | GenericDialect)
&& self.parse_keyword(Keyword::COMMENT))
{
self.prev_token();
if let Some(option) = self.parse_optional_column_option()? {
options.push(option);
}
};
let options = if !options.is_empty() {
Some(options)
self.parse_optional_column_option()?
.map(|option| vec![option])
} else {
None
};
Expand Down

0 comments on commit 80f7aea

Please sign in to comment.