(&mut self, emit_to: EmitTo)
| 85 | } |
| 86 | |
| 87 | fn take(&mut self, emit_to: EmitTo) -> Result<ArrayRef> { |
| 88 | let values = emit_to.take_needed(&mut self.vals); |
| 89 | let null_buf = NullBuffer::new(take_need(&mut self.nulls, emit_to)); |
| 90 | let array: PrimitiveArray<T> = |
| 91 | PrimitiveArray::<T>::new(values.into(), Some(null_buf)) |
| 92 | .with_data_type(self.data_type.clone()); |
| 93 | Ok(Arc::new(array)) |
| 94 | } |
| 95 | |
| 96 | fn size(&self) -> usize { |
| 97 | self.vals.capacity() * size_of::<T::Native>() + self.nulls.capacity() / 8 |