Skip to content

Commit

Permalink
upgrade to datafusion 42 (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored Sep 18, 2024
1 parent b1ca610 commit 523c980
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "datafusion-functions-json"
version = "0.41.0"
version = "0.42.0"
edition = "2021"
description = "JSON functions for DataFusion"
readme = "README.md"
Expand All @@ -11,16 +11,16 @@ repository = "https://github.com/datafusion-contrib/datafusion-functions-json/"
rust-version = "1.76.0"

[dependencies]
datafusion = "41"
datafusion = "42"
jiter = "0.5"
paste = "1"
log = "0.4"

[dev-dependencies]
codspeed-criterion-compat = "2.3"
codspeed-criterion-compat = "2.6"
criterion = "0.5.1"
clap = "4"
tokio = { version = "1.37", features = ["full"] }
tokio = { version = "1.38", features = ["full"] }

[lints.clippy]
dbg_macro = "deny"
Expand Down
14 changes: 11 additions & 3 deletions tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,10 +949,18 @@ async fn test_arrow_nested_double_columns() {
}

#[tokio::test]
async fn test_lexical_precedence_wrong() {
async fn test_lexical_precedence_correct() {
#[rustfmt::skip]
let expected = [
"+------+",
"| v |",
"+------+",
"| true |",
"+------+",
];
let sql = r#"select '{"a": "b"}'->>'a'='b' as v"#;
let err = run_query(sql).await.unwrap_err();
assert_eq!(err.to_string(), "Error during planning: Unexpected argument type to 'json_as_text' at position 2, expected string or int, got Boolean.");
let batches = run_query(sql).await.unwrap();
assert_batches_eq!(expected, &batches);
}

#[tokio::test]
Expand Down

0 comments on commit 523c980

Please sign in to comment.