Skip to content

Commit 8fc08ee

Browse files
authored
Support 38.0.0 (#11)
1 parent 4bcf8af commit 8fc08ee

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

Cargo.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "datafusion-functions-json"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2021"
55
description = "JSON functions for DataFusion"
66
readme = "README.md"
@@ -10,17 +10,17 @@ categories = ["database-implementations", "parsing"]
1010
repository = "https://github.com/datafusion-contrib/datafusion-functions-json/"
1111

1212
[dependencies]
13-
arrow = "51.0.0"
14-
arrow-schema = "51.0.0"
15-
datafusion-common = "37.0.0"
16-
datafusion-expr = "37.0.0"
17-
jiter = "0.3.0"
18-
paste = "1.0.14"
19-
log = "0.4.21"
20-
datafusion-execution = "37.0.0"
13+
arrow = ">=51"
14+
arrow-schema = ">=51"
15+
datafusion-common = ">=38"
16+
datafusion-expr = ">=38"
17+
jiter = ">=0.3"
18+
paste = ">=1.0.14"
19+
log = ">=0.4.21"
20+
datafusion-execution = ">=38"
2121

2222
[dev-dependencies]
23-
datafusion = "37.0.0"
23+
datafusion = "38.0.0"
2424
tokio = { version = "1.37.0", features = ["full"] }
2525

2626
[lints.clippy]

src/rewrite.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ impl FunctionRewrite for JsonFunctionRewriter {
1717
fn rewrite(&self, expr: Expr, _schema: &DFSchema, _config: &ConfigOptions) -> Result<Transformed<Expr>> {
1818
if let Expr::Cast(cast) = &expr {
1919
if let Expr::ScalarFunction(func) = &*cast.expr {
20-
if let ScalarFunctionDefinition::UDF(udf) = &func.func_def {
21-
if udf.name() == "json_get" {
22-
if let Some(t) = switch_json_get(&cast.data_type, &func.args) {
23-
return Ok(t);
24-
}
20+
let ScalarFunctionDefinition::UDF(udf) = &func.func_def;
21+
if udf.name() == "json_get" {
22+
if let Some(t) = switch_json_get(&cast.data_type, &func.args) {
23+
return Ok(t);
2524
}
2625
}
2726
}

0 commit comments

Comments
 (0)