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

Function map_extract_inner

datafusion/functions-nested/src/map_extract.rs:183–202  ·  view source on GitHub ↗
(args: &[ArrayRef])

Source from the content-addressed store, hash-verified

181}
182
183fn map_extract_inner(args: &[ArrayRef]) -> Result<ArrayRef> {
184 let [map_arg, key_arg] = take_function_args("map_extract", args)?;
185
186 let map_array = match map_arg.data_type() {
187 DataType::Map(_, _) => as_map_array(&map_arg)?,
188 _ => return exec_err!("The first argument in map_extract must be a map"),
189 };
190
191 let key_type = map_array.key_type();
192
193 if key_type != key_arg.data_type() {
194 return exec_err!(
195 "The key type {} does not match the map key type {}",
196 key_arg.data_type(),
197 key_type
198 );
199 }
200
201 general_map_extract_inner(map_array, key_arg)
202}

Callers

nothing calls this directly

Calls 4

take_function_argsFunction · 0.85
as_map_arrayFunction · 0.85
data_typeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…