File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -722,11 +722,6 @@ pub enum JsonPathElem {
722722 /// The expression used as the bracket key (string or numeric expression).
723723 key : Expr ,
724724 } ,
725- /// Accesses all elements in the given (generally array) element. Used for
726- /// constructs like `foo:bar[*].baz`.
727- ///
728- /// See <https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-json-path-expression#extract-values-from-arrays>
729- AllElements ,
730725}
731726
732727/// A JSON path.
@@ -764,9 +759,6 @@ impl fmt::Display for JsonPath {
764759 JsonPathElem :: ColonBracket { key } => {
765760 write ! ( f, ":[{key}]" ) ?;
766761 }
767- JsonPathElem :: AllElements => {
768- write ! ( f, "[*]" ) ?;
769- }
770762 }
771763 }
772764 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -1837,14 +1837,12 @@ impl Spanned for JsonPath {
18371837///
18381838/// Missing spans:
18391839/// - [JsonPathElem::Dot]
1840- /// - [JsonPathElem::AllElements]
18411840impl Spanned for JsonPathElem {
18421841 fn span ( & self ) -> Span {
18431842 match self {
18441843 JsonPathElem :: Dot { .. } => Span :: empty ( ) ,
18451844 JsonPathElem :: Bracket { key } => key. span ( ) ,
18461845 JsonPathElem :: ColonBracket { key } => key. span ( ) ,
1847- JsonPathElem :: AllElements => Span :: empty ( ) ,
18481846 }
18491847 }
18501848}
Original file line number Diff line number Diff line change @@ -843,7 +843,9 @@ fn parse_semi_structured_data_traversal() {
843843 key: "b" . to_owned( ) ,
844844 quoted: false
845845 } ,
846- JsonPathElem :: AllElements ,
846+ JsonPathElem :: Bracket {
847+ key: Expr :: Wildcard ( AttachedToken :: empty( ) )
848+ } ,
847849 JsonPathElem :: Dot {
848850 key: "c" . to_owned( ) ,
849851 quoted: false
You can’t perform that action at this time.
0 commit comments