Creates a new empty array ``` use std::sync::Arc; use arrow_schema::DataType; use arrow_array::{ArrayRef, Int32Array, new_empty_array}; let empty_array = new_empty_array(&DataType::Int32); let array: ArrayRef = Arc::new(Int32Array::from(vec![] as Vec )); assert_eq!(&array, &empty_array); ```
(data_type: &DataType)
| 1000 | /// assert_eq!(&array, &empty_array); |
| 1001 | /// ``` |
| 1002 | pub fn new_empty_array(data_type: &DataType) -> ArrayRef { |
| 1003 | let data = ArrayData::new_empty(data_type); |
| 1004 | make_array(data) |
| 1005 | } |
| 1006 | |
| 1007 | /// Creates a new array of `data_type` of length `length` filled |
| 1008 | /// entirely of `NULL` values |