We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1b052c commit 0434d6fCopy full SHA for 0434d6f
src/parser/mod.rs
@@ -2854,7 +2854,8 @@ impl<'a> Parser<'a> {
2854
fn parse_duckdb_struct_literal(&mut self) -> Result<Expr, ParserError> {
2855
self.expect_token(&Token::LBrace)?;
2856
2857
- let fields = self.parse_comma_separated(Self::parse_duckdb_dictionary_field)?;
+ let fields =
2858
+ self.parse_comma_separated0(Self::parse_duckdb_dictionary_field, Token::RBrace)?;
2859
2860
self.expect_token(&Token::RBrace)?;
2861
tests/sqlparser_common.rs
@@ -11291,6 +11291,8 @@ fn test_dictionary_syntax() {
11291
);
11292
}
11293
11294
+ check("{}", Expr::Dictionary(vec![]));
11295
+
11296
check(
11297
"{'Alberta': 'Edmonton', 'Manitoba': 'Winnipeg'}",
11298
Expr::Dictionary(vec![
0 commit comments