Skip to content

Commit

Permalink
Support 38.0.0 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored May 14, 2024
1 parent 4bcf8af commit 8fc08ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "datafusion-functions-json"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
description = "JSON functions for DataFusion"
readme = "README.md"
Expand All @@ -10,17 +10,17 @@ categories = ["database-implementations", "parsing"]
repository = "https://github.com/datafusion-contrib/datafusion-functions-json/"

[dependencies]
arrow = "51.0.0"
arrow-schema = "51.0.0"
datafusion-common = "37.0.0"
datafusion-expr = "37.0.0"
jiter = "0.3.0"
paste = "1.0.14"
log = "0.4.21"
datafusion-execution = "37.0.0"
arrow = ">=51"
arrow-schema = ">=51"
datafusion-common = ">=38"
datafusion-expr = ">=38"
jiter = ">=0.3"
paste = ">=1.0.14"
log = ">=0.4.21"
datafusion-execution = ">=38"

[dev-dependencies]
datafusion = "37.0.0"
datafusion = "38.0.0"
tokio = { version = "1.37.0", features = ["full"] }

[lints.clippy]
Expand Down
9 changes: 4 additions & 5 deletions src/rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ impl FunctionRewrite for JsonFunctionRewriter {
fn rewrite(&self, expr: Expr, _schema: &DFSchema, _config: &ConfigOptions) -> Result<Transformed<Expr>> {
if let Expr::Cast(cast) = &expr {
if let Expr::ScalarFunction(func) = &*cast.expr {
if let ScalarFunctionDefinition::UDF(udf) = &func.func_def {
if udf.name() == "json_get" {
if let Some(t) = switch_json_get(&cast.data_type, &func.args) {
return Ok(t);
}
let ScalarFunctionDefinition::UDF(udf) = &func.func_def;
if udf.name() == "json_get" {
if let Some(t) = switch_json_get(&cast.data_type, &func.args) {
return Ok(t);
}
}
}
Expand Down

0 comments on commit 8fc08ee

Please sign in to comment.