mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-03 22:08:16 +00:00
Store spans for Value expressions (#1738)
This commit is contained in:
parent
aab12add36
commit
c335c8883b
18 changed files with 1620 additions and 1042 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue