pub(crate) struct InProgressPrimitiveArray<T: ArrowPrimitiveType> {
data_type: DataType,
source: Option<ArrayRef>,
batch_size: usize,
nulls: NullBufferBuilder,
current: Vec<T::Native>,
}Expand description
InProgressArray for [PrimitiveArray]
Fields§
§data_type: DataTypeData type of the array
source: Option<ArrayRef>The current source, if any
batch_size: usizethe target batch size (and thus size for views allocation)
nulls: NullBufferBuilderIn progress nulls
current: Vec<T::Native>The currently in progress array
Implementations§
Source§impl<T: ArrowPrimitiveType> InProgressPrimitiveArray<T>
impl<T: ArrowPrimitiveType> InProgressPrimitiveArray<T>
Sourcepub(crate) fn new(batch_size: usize, data_type: DataType) -> Self
pub(crate) fn new(batch_size: usize, data_type: DataType) -> Self
Create a new InProgressPrimitiveArray
Sourcefn ensure_capacity(&mut self)
fn ensure_capacity(&mut self)
Allocate space for output values if necessary.
This is done on write (when we know it is necessary) rather than eagerly to avoid allocations that are not used.