Skip to content

Commit

Permalink
Revert "Add support for parsing empty dictionary expressions (apache#…
Browse files Browse the repository at this point in the history
…1684)"

This reverts commit 0434d6f.
  • Loading branch information
Vedin authored Feb 3, 2025
1 parent 4b3f748 commit 47c545e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2854,8 +2854,7 @@ impl<'a> Parser<'a> {
fn parse_duckdb_struct_literal(&mut self) -> Result<Expr, ParserError> {
self.expect_token(&Token::LBrace)?;

let fields =
self.parse_comma_separated0(Self::parse_duckdb_dictionary_field, Token::RBrace)?;
let fields = self.parse_comma_separated(Self::parse_duckdb_dictionary_field)?;

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

Expand Down
2 changes: 0 additions & 2 deletions tests/sqlparser_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11291,8 +11291,6 @@ fn test_dictionary_syntax() {
);
}

check("{}", Expr::Dictionary(vec![]));

check(
"{'Alberta': 'Edmonton', 'Manitoba': 'Winnipeg'}",
Expr::Dictionary(vec![
Expand Down

0 comments on commit 47c545e

Please sign in to comment.