alamb commented on issue #7083: URL: https://github.com/apache/arrow-rs/issues/7083#issuecomment-2653571083
I tested the pre-release update of 54.2.0 with DataFusion - https://github.com/apache/datafusion/pull/14628 It turns out that arrow has `rand` in the public API as part of the `bench_util` and I got a few compile errors like ``` I had to copy some of this code into arrow-rs because the version of rand was updated and the rand structures appear directly in the bench_util API I got an error like this ``` error[E0599]: the method `gen` exists for struct `StdRng`, but its trait bounds were not satisfied --> datafusion/functions-aggregate/benches/array_agg.rs:64:27 | 64 | let is_null = rng.gen::<f32>() < null_density; | ^^^ method cannot be called on `StdRng` due to unsatisfied trait bounds | ::: /Users/andrewlamb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.9.0/src/rngs/std.rs:70:1 | 70 | pub struct StdRng(Rng); | ----------------- doesn't satisfy `rand::rngs::std::StdRng: rand::RngCore` or `rand::rngs::std::StdRng: rand::Rng` | = note: the following trait bounds were not satisfied: `rand::rngs::std::StdRng: rand::RngCore` which is required by `rand::rngs::std::StdRng: rand::Rng` = help: items from traits can only be used if the trait is in scope help: trait `Rng` which provides `gen` is implemented but not in scope; perhaps you want to import it | 18 + use rand::rng::Rng; ``` There are two potential solutions I can think of 1. (the nicest) revert the upgrade to rand 2. (the easiest) Publicly export `rand` so the correct version can be used in the API I am going to make a PR for 2 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
