(args: &[ArrayRef])
| 178 | } |
| 179 | |
| 180 | fn array_dims_inner(args: &[ArrayRef]) -> Result<ArrayRef> { |
| 181 | let [array] = take_function_args("array_dims", args)?; |
| 182 | let data: Vec<_> = match array.data_type() { |
| 183 | List(_) => as_list_array(&array)? |
| 184 | .iter() |
| 185 | .map(compute_array_dims) |
| 186 | .try_collect()?, |
| 187 | LargeList(_) => as_large_list_array(&array)? |
| 188 | .iter() |
| 189 | .map(compute_array_dims) |
| 190 | .try_collect()?, |
| 191 | FixedSizeList(..) => as_fixed_size_list_array(&array)? |
| 192 | .iter() |
| 193 | .map(compute_array_dims) |
| 194 | .try_collect()?, |
| 195 | arg_type => { |
| 196 | return exec_err!("array_dims does not support type {arg_type}"); |
| 197 | } |
| 198 | }; |
| 199 | |
| 200 | let result = ListArray::from_iter_primitive::<UInt64Type, _, _>(data); |
| 201 | Ok(Arc::new(result)) |
| 202 | } |
| 203 | |
| 204 | fn array_ndims_inner(args: &[ArrayRef]) -> Result<ArrayRef> { |
| 205 | let [array] = take_function_args("array_ndims", args)?; |
nothing calls this directly
no test coverage detected
searching dependent graphs…