(args: &[ArrayRef])
| 453 | } |
| 454 | |
| 455 | fn array_replace_all_inner(args: &[ArrayRef]) -> Result<ArrayRef> { |
| 456 | let [array, from, to] = take_function_args("array_replace_all", args)?; |
| 457 | |
| 458 | // replace all occurrences (up to "i64::MAX") |
| 459 | let arr_n = vec![i64::MAX; array.len()]; |
| 460 | match array.data_type() { |
| 461 | DataType::List(_) => { |
| 462 | let list_array = array.as_list::<i32>(); |
| 463 | general_replace::<i32>(list_array, from, to, &arr_n) |
| 464 | } |
| 465 | DataType::LargeList(_) => { |
| 466 | let list_array = array.as_list::<i64>(); |
| 467 | general_replace::<i64>(list_array, from, to, &arr_n) |
| 468 | } |
| 469 | DataType::Null => Ok(new_null_array(array.data_type(), 1)), |
| 470 | array_type => { |
| 471 | exec_err!("array_replace_all does not support type '{array_type}'.") |
| 472 | } |
| 473 | } |
| 474 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…