File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -8192,19 +8192,14 @@ impl<'a> Parser<'a> {
8192
8192
/// Parses a column definition within a view.
8193
8193
fn parse_view_column ( & mut self ) -> Result < ViewColumnDef , ParserError > {
8194
8194
let name = self . parse_identifier ( false ) ?;
8195
- let mut options = vec ! [ ] ;
8196
- if ( dialect_of ! ( self is BigQueryDialect | GenericDialect )
8195
+ let options = if ( dialect_of ! ( self is BigQueryDialect | GenericDialect )
8197
8196
&& self . parse_keyword ( Keyword :: OPTIONS ) )
8198
8197
|| ( dialect_of ! ( self is SnowflakeDialect | GenericDialect )
8199
8198
&& self . parse_keyword ( Keyword :: COMMENT ) )
8200
8199
{
8201
8200
self . prev_token ( ) ;
8202
- if let Some ( option) = self . parse_optional_column_option ( ) ? {
8203
- options. push ( option) ;
8204
- }
8205
- } ;
8206
- let options = if !options. is_empty ( ) {
8207
- Some ( options)
8201
+ self . parse_optional_column_option ( ) ?
8202
+ . map ( |option| vec ! [ option] )
8208
8203
} else {
8209
8204
None
8210
8205
} ;
You can’t perform that action at this time.
0 commit comments