datafusion-contrib / datafusion-functions-json

JSON / JSONB support for DataFusion (unofficial)
https://crates.io/crates/datafusion-functions-json
Apache License 2.0
13 stars 5 forks source link

Compilation fails with jiter 0.4.0 #12

Closed sergiimk closed 3 weeks ago

sergiimk commented 1 month ago

jiter dependency got a version update and this crate now fails to compile:

Compiling datafusion-functions-json v0.1.3
error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> /home/.../datafusion-functions-json-0.1.3/src/common.rs:162:25
    |
162 |         let mut jiter = Jiter::new(json_str.as_bytes(), false);
    |                         ^^^^^^^^^^                    -------
    |                                                       | |
    |                                                       | unexpected argument of type `bool`
    |                                                       help: remove the extra argument
    |

Current dependency spec is jiter = ">=0.3" but perhaps it would be better to include an upper restriction which can be bumped after testing against to prevent random failures.

sergiimk commented 1 month ago

Cargo makes it surprisingly hard to pin version of a transitive dependency even within compatible range...

I had to fork and patch manually:

[patch.crates-io]
datafusion-functions-json = { git = 'https://github.com/kamu-data/datafusion-functions-json.git', branch = "pin-jiter" }