Function arrow::array::new_null_array[][src]

pub fn new_null_array(data_type: &DataType, length: usize) -> ArrayRef
Expand description

Creates a new array of data_type of length length filled entirely of NULL values

use std::sync::Arc;
use arrow::datatypes::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);