Converts `Vec ` where each element has type corresponding to `data_type`, to a [`LargeListArray`]. Example ``` use arrow::array::{Int32Array, LargeListArray}; use arrow::datatypes::{DataType, Int32Type}; use datafusion_common::cast::as_large_list_array; use datafusion_common::ScalarValue; let scalars = vec![ ScalarValue::Int32(Some(1)), ScalarValue::Int32(None), ScalarValue::Int32(So
(
values: &[ScalarValue],
data_type: &DataType,
)
| 3289 | /// assert_eq!(*result, expected); |
| 3290 | /// ``` |
| 3291 | pub fn new_large_list( |
| 3292 | values: &[ScalarValue], |
| 3293 | data_type: &DataType, |
| 3294 | ) -> Arc<LargeListArray> { |
| 3295 | let values = if values.is_empty() { |
| 3296 | new_empty_array(data_type) |
| 3297 | } else { |
| 3298 | Self::iter_to_array(values.iter().cloned()).unwrap() |
| 3299 | }; |
| 3300 | Arc::new(SingleRowListArrayBuilder::new(values).build_large_list_array()) |
| 3301 | } |
| 3302 | |
| 3303 | /// Converts a scalar value into an array of `size` rows. |
| 3304 | /// |
nothing calls this directly
no test coverage detected