MCPcopy Create free account
hub / github.com/apache/datafusion / find_duplicate_value

Function find_duplicate_value

datafusion/functions-nested/src/map.rs:160–167  ·  view source on GitHub ↗
(len: usize, values: I)

Source from the content-addressed store, hash-verified

158}
159
160fn find_duplicate_value<T, I>(len: usize, values: I) -> Option<T>
161where
162 T: Copy + Eq + Hash,
163 I: IntoIterator<Item = T>,
164{
165 let mut seen_keys = HashSet::with_capacity(len);
166 values.into_iter().find(|value| !seen_keys.insert(*value))
167}
168
169fn validate_unique_keys_generic(array: &dyn Array) -> Result<()> {
170 let mut seen_keys = HashSet::with_capacity(array.len());

Callers 3

validate_unique_str_keysFunction · 0.85

Calls 2

into_iterMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…