Creates a new array of `data_type` of length `length` filled entirely of `NULL` values ``` use std::sync::Arc; use arrow_schema::DataType; use arrow_array::{ArrayRef, Int32Array, new_null_array}; let null_array = new_null_array(&DataType::Int32, 3); let array: ArrayRef = Arc::new(Int32Array::from(vec![None, None, None])); assert_eq!(&array, &null_array); ```
(data_type: &DataType, length: usize)
| 1018 | /// assert_eq!(&array, &null_array); |
| 1019 | /// ``` |
| 1020 | pub fn new_null_array(data_type: &DataType, length: usize) -> ArrayRef { |
| 1021 | make_array(ArrayData::new_null(data_type, length)) |
| 1022 | } |
| 1023 | |
| 1024 | /// Helper function that creates an [`OffsetBuffer`] from a buffer and array offset/ length |
| 1025 | /// |