Skip to content

Commit 47c545e

Browse files
authored
Revert "Add support for parsing empty dictionary expressions (apache#1684)"
This reverts commit 0434d6f.
1 parent 4b3f748 commit 47c545e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/parser/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2854,8 +2854,7 @@ impl<'a> Parser<'a> {
28542854
fn parse_duckdb_struct_literal(&mut self) -> Result<Expr, ParserError> {
28552855
self.expect_token(&Token::LBrace)?;
28562856

2857-
let fields =
2858-
self.parse_comma_separated0(Self::parse_duckdb_dictionary_field, Token::RBrace)?;
2857+
let fields = self.parse_comma_separated(Self::parse_duckdb_dictionary_field)?;
28592858

28602859
self.expect_token(&Token::RBrace)?;
28612860

tests/sqlparser_common.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11291,8 +11291,6 @@ fn test_dictionary_syntax() {
1129111291
);
1129211292
}
1129311293

11294-
check("{}", Expr::Dictionary(vec![]));
11295-
1129611294
check(
1129711295
"{'Alberta': 'Edmonton', 'Manitoba': 'Winnipeg'}",
1129811296
Expr::Dictionary(vec![

0 commit comments

Comments
 (0)