Skip to content

Commit 843bc1f

Browse files
committed
remove
1 parent 30914e8 commit 843bc1f

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

‎src/ast/mod.rs‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff 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(())

‎src/ast/spans.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,14 +1837,12 @@ impl Spanned for JsonPath {
18371837
///
18381838
/// Missing spans:
18391839
/// - [JsonPathElem::Dot]
1840-
/// - [JsonPathElem::AllElements]
18411840
impl 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
}

‎tests/sqlparser_databricks.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)