File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -7341,6 +7341,10 @@ impl<'a> Parser<'a> {
7341
7341
pub fn parse_options(&mut self, keyword: Keyword) -> Result<Vec<SqlOption>, ParserError> {
7342
7342
if self.parse_keyword(keyword) {
7343
7343
self.expect_token(&Token::LParen)?;
7344
+ if self.peek_token() == Token::RParen {
7345
+ self.next_token();
7346
+ return Ok(vec![]);
7347
+ }
7344
7348
let options = self.parse_comma_separated(Parser::parse_sql_option)?;
7345
7349
self.expect_token(&Token::RParen)?;
7346
7350
Ok(options)
Original file line number Diff line number Diff line change @@ -2244,3 +2244,15 @@ fn test_any_type() {
2244
2244
fn test_any_type_dont_break_custom_type ( ) {
2245
2245
bigquery_and_generic ( ) . verified_stmt ( "CREATE TABLE foo (x ANY)" ) ;
2246
2246
}
2247
+
2248
+ #[ test]
2249
+ fn parse_create_table_with_empty_table_options ( ) {
2250
+ let sql = "CREATE TABLE foo (x INT64) OPTIONS()" ;
2251
+ bigquery ( ) . verified_stmt ( sql) ;
2252
+ }
2253
+
2254
+ #[ test]
2255
+ fn parse_create_table_with_empty_table_options_and_column_options ( ) {
2256
+ let sql = "CREATE TABLE db.schema.test (x INT64 OPTIONS(description = 'An optional INTEGER field')) OPTIONS()" ;
2257
+ bigquery ( ) . verified_stmt ( sql) ;
2258
+ }
You can’t perform that action at this time.
0 commit comments