Benign crates 101,521,111 installs Download

arrow-data 40.0.0

“Array data abstractions for Apache Arrow”

Rust test marker or harnessimports arrow_buffer::Buffer
SHA-25661bc8df9912cca6642665fdf989d6fa0de2570f18a7f709bcf59d29de96d2097

Evidence

imports arrow_buffer::buffer::BooleanBuffer mod.rs · lines 19–39
19:12… attributes and operations for Arrow array.
20
21use crate::bit_iterator::BitSliceIterator;
22use arrow_buffer::bit_chunk_iterator::BitChunks;
23use arrow_buffer::buffer::{BooleanBuffer, NullBuffer};
24use arrow_buffer::{bit_util, ArrowNativeType, Buffer, MutableBuffer};
25use arrow_schema::{ArrowError, DataType, UnionMode};
26use std::convert::TryInto;
27use std::mem;
28use std::ops::Range;
29use std::sync::Arc;
30
31use crate::equal;
32
33mod buffers;
34pub use buffers::*;
35
36#[inline]
37pub(crate) fn contains_nulls(
38 null_bit_buffer: Option<&NullBuffer>,
39 offset: …
imports arrow_schema::Field mod.rs · lines 1818–1831
⋯4 lines
1822}
1823
1824#[cfg(test)]
1825mod tests {
1826 use super::*;
1827 use arrow_schema::{Field, UnionFields};
1828
1829 // See arrow/tests/array_data_validation.rs for test of array validation
1830
1831 /// returns a buffer ini …
#[test] attribute mod.rs · lines 1837–1845
1837:36… Buffer {
1838 Buffer::from_slice_ref(vec![42f32; n])
1839 }
1840
1841 #[test]
1842 fn test_builder() {
1843 // Buffer needs to be at least 25 long
1844 let v = (0..25).collect::<Vec<i32>>();
1845 l …
imports arrow_buffer::buffer::NullBuffer ffi.rs · lines 18–28
18:77… ache.org/docs/format/CDataInterface.html).
19
20use crate::bit_mask::set_bits;
21use crate::{layout, ArrayData};
22use arrow_buffer::buffer::NullBuffer;
23use arrow_buffer::{Buffer, MutableBuffer};
24use arrow_schema::DataType;
25use std::ffi::c_void;
26
27/// ABI-compatible struct for ArrowArray from C Data Interface
28/// See <https://arrow.apache.org/docs/format/CDataInterface.h …
imports super::* ffi.rs · lines 282–301
282:63… of `Self`
283 unsafe { self.dictionary.as_ref() }
284 }
285}
286
287#[cfg(test)]
288mod tests {
289 use super::*;
290
291 // More tests located in top-level arrow crate
292
293 #[test]
294 fn null_array_n_buffers() {
295 let data = ArrayData::new_null(&DataType::Null, 10);
296
297 let ffi_array = FFI_ArrowArray::new(&data);
298 assert_eq!(0, ffi_array.n_buffers);
299
300 let private_data =
301 unsafe { Box::from_raw(ffi_arr …

Showing the top 5 files — 1 more file (23 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.