Skip to content

Commit c4f4298

Browse files
authored
Merge pull request #6 from lakehq/df-48.0.0
chore: Upgrade to DataFusion 48.0.0
2 parents 6b3eb6a + d6c07a3 commit c4f4298

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ 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" # Jitter has a dependency on pyo3, which needs to match the version used in DataFusion
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 = ["nested_expressions"] }
2121
codspeed-criterion-compat = "2.6"
2222
criterion = "0.5.1"
2323
clap = "4"

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)