Store spans for Value expressions (#1738)

This commit is contained in:
Ophir LOJKINE 2025-02-25 07:33:57 +01:00 committed by GitHub
parent aab12add36
commit c335c8883b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1620 additions and 1042 deletions

View file

@ -208,7 +208,7 @@ fn test_redshift_json_path() {
path: JsonPath {
path: vec![
JsonPathElem::Bracket {
key: Expr::Value(number("0"))
key: Expr::value(number("0"))
},
JsonPathElem::Dot {
key: "o_orderkey".to_string(),
@ -231,10 +231,12 @@ fn test_redshift_json_path() {
path: JsonPath {
path: vec![
JsonPathElem::Bracket {
key: Expr::Value(number("0"))
key: Expr::value(number("0"))
},
JsonPathElem::Bracket {
key: Expr::Value(Value::SingleQuotedString("id".to_owned()))
key: Expr::Value(
(Value::SingleQuotedString("id".to_owned())).with_empty_span()
)
}
]
}
@ -255,10 +257,12 @@ fn test_redshift_json_path() {
path: JsonPath {
path: vec![
JsonPathElem::Bracket {
key: Expr::Value(number("0"))
key: Expr::value(number("0"))
},
JsonPathElem::Bracket {
key: Expr::Value(Value::SingleQuotedString("id".to_owned()))
key: Expr::Value(
(Value::SingleQuotedString("id".to_owned())).with_empty_span()
)
}
]
}
@ -279,7 +283,7 @@ fn test_redshift_json_path() {
path: JsonPath {
path: vec![
JsonPathElem::Bracket {
key: Expr::Value(number("0"))
key: Expr::value(number("0"))
},
JsonPathElem::Dot {
key: "id".to_string(),
@ -306,7 +310,7 @@ fn test_parse_json_path_from() {
&Some(JsonPath {
path: vec![
JsonPathElem::Bracket {
key: Expr::Value(number("0"))
key: Expr::value(number("0"))
},
JsonPathElem::Dot {
key: "a".to_string(),
@ -330,14 +334,16 @@ fn test_parse_json_path_from() {
&Some(JsonPath {
path: vec![
JsonPathElem::Bracket {
key: Expr::Value(number("0"))
key: Expr::value(number("0"))
},
JsonPathElem::Dot {
key: "a".to_string(),
quoted: false
},
JsonPathElem::Bracket {
key: Expr::Value(Value::Number("1".parse().unwrap(), false))
key: Expr::Value(
(Value::Number("1".parse().unwrap(), false)).with_empty_span()
)
},
JsonPathElem::Dot {
key: "b".to_string(),