(args: &[ArrayRef])
| 116 | } |
| 117 | |
| 118 | fn 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 | |
| 134 | fn get_map_values_field_as_list_field(map_type: &DataType) -> Result<FieldRef> { |
| 135 | let map_fields = get_map_entry_field(map_type)?; |
nothing calls this directly
no test coverage detected
searching dependent graphs…