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

Function map_values_inner

datafusion/functions-nested/src/map_values.rs:118–132  ·  view source on GitHub ↗
(args: &[ArrayRef])

Source from the content-addressed store, hash-verified

116}
117
118fn map_values_inner(args: &[ArrayRef]) -> Result<ArrayRef> {
119 let [map_arg] = take_function_args("map_values", args)?;
120
121 let map_array = match map_arg.data_type() {
122 DataType::Map(_, _) => as_map_array(&map_arg)?,
123 _ => return exec_err!("Argument for map_values should be a map"),
124 };
125
126 Ok(Arc::new(ListArray::new(
127 get_map_values_field_as_list_field(map_arg.data_type())?,
128 map_array.offsets().clone(),
129 Arc::clone(map_array.values()),
130 map_array.nulls().cloned(),
131 )))
132}
133
134fn get_map_values_field_as_list_field(map_type: &DataType) -> Result<FieldRef> {
135 let map_fields = get_map_entry_field(map_type)?;

Callers

nothing calls this directly

Calls 10

take_function_argsFunction · 0.85
as_map_arrayFunction · 0.85
newFunction · 0.85
offsetsMethod · 0.80
data_typeMethod · 0.45
cloneMethod · 0.45
valuesMethod · 0.45
clonedMethod · 0.45
nullsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…