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

Function validate_unique_str_keys

datafusion/functions-nested/src/map.rs:128–142  ·  view source on GitHub ↗
(
    null_count: usize,
    len: usize,
    values: impl IntoIterator<Item = &'a str>,
)

Source from the content-addressed store, hash-verified

126}
127
128fn validate_unique_str_keys<'a>(
129 null_count: usize,
130 len: usize,
131 values: impl IntoIterator<Item = &'a str>,
132) -> Result<()> {
133 if null_count > 0 {
134 return exec_err!("map key cannot be null");
135 }
136
137 if let Some(value) = find_duplicate_value(len, values) {
138 return exec_err!("map key must be unique, duplicate key found: {}", value);
139 }
140
141 Ok(())
142}
143
144fn validate_unique_binary_keys<'a>(
145 null_count: usize,

Callers 1

validate_map_keysFunction · 0.85

Calls 1

find_duplicate_valueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…