We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 223d1dd commit f57af7fCopy full SHA for f57af7f
tests/sqlparser_databricks.rs
@@ -405,4 +405,27 @@ fn parse_semi_structured_data_traversal() {
405
}),
406
select.projection[0]
407
);
408
+
409
+ // asterisk for arrays
410
+ let sql = "SELECT a:b[*].c FROM t";
411
+ let select = databricks().verified_only_select(sql);
412
+ assert_eq!(
413
+ SelectItem::UnnamedExpr(Expr::JsonAccess {
414
+ value: Box::new(Expr::Identifier(Ident::new("a"))),
415
+ path: JsonPath {
416
+ path: vec![
417
+ JsonPathElem::Dot {
418
+ key: "b".to_owned(),
419
+ quoted: false
420
+ },
421
+ JsonPathElem::AllElements,
422
423
+ key: "c".to_owned(),
424
425
+ }
426
+ ]
427
428
+ }),
429
+ select.projection[0]
430
+ );
431
}
0 commit comments