(args: &[ArrayRef])
| 106 | } |
| 107 | |
| 108 | fn map_keys_inner(args: &[ArrayRef]) -> Result<ArrayRef> { |
| 109 | let [map_arg] = take_function_args("map_keys", args)?; |
| 110 | |
| 111 | let map_array = match map_arg.data_type() { |
| 112 | DataType::Map(_, _) => as_map_array(&map_arg)?, |
| 113 | _ => return exec_err!("Argument for map_keys should be a map"), |
| 114 | }; |
| 115 | |
| 116 | Ok(Arc::new(ListArray::new( |
| 117 | // internal array nullability is true to be in sync with DuckDB |
| 118 | Arc::new(Field::new_list_field(map_array.key_type().clone(), true)), |
| 119 | map_array.offsets().clone(), |
| 120 | Arc::clone(map_array.keys()), |
| 121 | map_array.nulls().cloned(), |
| 122 | ))) |
| 123 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…