Convert any [`Self::Scalar`] into an Arrow [`ArrayRef`] with the specified number of rows by repeating the same scalar multiple times, which is not as efficient as handling the scalar directly. [`Self::Array`] will just be returned as is. See [`Self::into_array_of_size`] if you need to validate the length of the output array. See [`Self::values_to_arrays`] to convert multiple columnar values in
(self, num_rows: usize)
| 134 | /// |
| 135 | /// Errors if `self` is a Scalar that fails to be converted into an array of size |
| 136 | pub fn into_array(self, num_rows: usize) -> Result<ArrayRef> { |
| 137 | Ok(match self { |
| 138 | ColumnarValue::Array(array) => array, |
| 139 | ColumnarValue::Scalar(scalar) => scalar.to_array_of_size(num_rows)?, |
| 140 | }) |
| 141 | } |
| 142 | |
| 143 | /// Convert a columnar value into an Arrow [`ArrayRef`] with the specified |
| 144 | /// number of rows. [`Self::Scalar`] is converted by repeating the same |