Skip to content

Commit ad5e9e9

Browse files
Bump to datafusion 48
1 parent 6563748 commit ad5e9e9

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "datafusion-functions-json"
3-
version = "0.47.0"
3+
version = "0.48.0"
44
edition = "2021"
55
description = "JSON functions for DataFusion"
66
readme = "README.md"
@@ -11,19 +11,18 @@ repository = "https://github.com/datafusion-contrib/datafusion-functions-json/"
1111
rust-version = "1.82.0"
1212

1313
[dependencies]
14-
datafusion = { version = "47", default-features = false }
14+
datafusion = { version = "48", default-features = false }
1515
jiter = "0.9"
1616
paste = "1"
1717
log = "0.4"
1818

1919
[dev-dependencies]
20-
datafusion = { version = "47", default-features = false , features = ["nested_expressions"]}
20+
datafusion = { version = "48", default-features = false, features = [
21+
"nested_expressions",
22+
] }
2123
codspeed-criterion-compat = "2.6"
2224
tokio = { version = "1.43", features = ["full"] }
2325

24-
[patch.crates-io]
25-
datafusion = { git = "https://github.com/apache/datafusion.git", rev = "5bdaeaf" }
26-
2726
[lints.clippy]
2827
dbg_macro = "deny"
2928
print_stdout = "deny"

src/rewrite.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn unnest_json_calls(func: &ScalarFunction) -> Option<Transformed<Expr>> {
8080
let mut args = inner_func.args.clone();
8181
args.extend(outer_args_iter.cloned());
8282
// See #23, unnest only when all lookup arguments are literals
83-
if args.iter().skip(1).all(|arg| matches!(arg, Expr::Literal(_))) {
83+
if args.iter().skip(1).all(|arg| matches!(arg, Expr::Literal(_, _))) {
8484
Some(Transformed::yes(Expr::ScalarFunction(ScalarFunction {
8585
func: func.func.clone(),
8686
args,
@@ -149,7 +149,7 @@ fn expr_to_sql_repr(expr: &Expr) -> String {
149149
.as_ref()
150150
.map_or_else(|| name.clone(), |r| format!("{r}.{name}")),
151151
Expr::Alias(alias) => alias.name.clone(),
152-
Expr::Literal(scalar) => match scalar {
152+
Expr::Literal(scalar, _) => match scalar {
153153
ScalarValue::Utf8(Some(v)) | ScalarValue::Utf8View(Some(v)) | ScalarValue::LargeUtf8(Some(v)) => {
154154
format!("'{v}'")
155155
}

0 commit comments

Comments
 (0)