|
19 | 19 |
|
20 | 20 | use arrow::array::types::{IntervalDayTime, IntervalMonthDayNano}; |
21 | 21 | use arrow::array::*; |
| 22 | +#[cfg(not(feature = "force_hash_collisions"))] |
22 | 23 | use arrow::compute::take; |
23 | 24 | use arrow::datatypes::*; |
24 | 25 | #[cfg(not(feature = "force_hash_collisions"))] |
25 | 26 | use arrow::{downcast_dictionary_array, downcast_primitive_array}; |
26 | 27 | use foldhash::fast::FixedState; |
| 28 | +#[cfg(not(feature = "force_hash_collisions"))] |
27 | 29 | use itertools::Itertools; |
| 30 | +#[cfg(not(feature = "force_hash_collisions"))] |
28 | 31 | use std::collections::HashMap; |
29 | 32 | use std::hash::{BuildHasher, Hash, Hasher}; |
30 | 33 |
|
@@ -198,6 +201,7 @@ hash_float_value!((half::f16, u16), (f32, u32), (f64, u64)); |
198 | 201 | /// Create a `SeedableRandomState` whose per-hasher seed incorporates `seed`. |
199 | 202 | /// This folds the previous hash into the hasher's initial state so only the |
200 | 203 | /// new value needs to pass through the hash function — same cost as `hash_one`. |
| 204 | +#[cfg(not(feature = "force_hash_collisions"))] |
201 | 205 | #[inline] |
202 | 206 | fn seeded_state(seed: u64) -> foldhash::fast::SeedableRandomState { |
203 | 207 | foldhash::fast::SeedableRandomState::with_seed( |
@@ -303,6 +307,7 @@ fn hash_array<T>( |
303 | 307 | /// HAS_NULLS: do we have to check null in the inner loop |
304 | 308 | /// HAS_BUFFERS: if true, array has external buffers; if false, all strings are inlined/ less then 12 bytes |
305 | 309 | /// REHASH: if true, combining with existing hash, otherwise initializing |
| 310 | +#[cfg(not(feature = "force_hash_collisions"))] |
306 | 311 | #[inline(never)] |
307 | 312 | fn hash_string_view_array_inner< |
308 | 313 | T: ByteViewType, |
@@ -429,6 +434,7 @@ fn hash_generic_byte_view_array<T: ByteViewType>( |
429 | 434 | /// - `HAS_NULL_KEYS`: Whether to check for null dictionary keys |
430 | 435 | /// - `HAS_NULL_VALUES`: Whether to check for null dictionary values |
431 | 436 | /// - `MULTI_COL`: Whether to combine with existing hash (true) or initialize (false) |
| 437 | +#[cfg(not(feature = "force_hash_collisions"))] |
432 | 438 | #[inline(never)] |
433 | 439 | fn hash_dictionary_inner< |
434 | 440 | K: ArrowDictionaryKeyType, |
|
0 commit comments