MCPcopy Create free account
hub / github.com/apache/arrow-rs / is_null

Method is_null

arrow-array/src/array/mod.rs:268–270  ·  view source on GitHub ↗

Returns whether the element at `index` is null according to [`Array::nulls`] Note: For performance reasons, this method returns nullability solely as determined by the null buffer. This difference can lead to surprising results, for example, [`NullArray::is_null`] always returns `false` as the array lacks a null buffer. Similarly [`DictionaryArray`], [`RunArray`] and [`UnionArray`] may encode nul

(&self, index: usize)

Source from the content-addressed store, hash-verified

266 /// assert_eq!(array.is_null(0), false);
267 /// ```
268 fn is_null(&self, index: usize) -> bool {
269 self.nulls().map(|n| n.is_null(index)).unwrap_or_default()
270 }
271
272 /// Returns whether the element at `index` is *not* null, the
273 /// opposite of [`Self::is_null`].

Callers

nothing calls this directly

Implementers 15

dictionary_array.rsarrow-array/src/array/dictionary_array
run_array.rsarrow-array/src/array/run_array.rs
primitive_array.rsarrow-array/src/array/primitive_array.
fixed_size_binary_array.rsarrow-array/src/array/fixed_size_binar
byte_view_array.rsarrow-array/src/array/byte_view_array.
mod.rsarrow-array/src/array/mod.rs
union_array.rsarrow-array/src/array/union_array.rs
boolean_array.rsarrow-array/src/array/boolean_array.rs
byte_array.rsarrow-array/src/array/byte_array.rs
list_view_array.rsarrow-array/src/array/list_view_array.
map_array.rsarrow-array/src/array/map_array.rs
struct_array.rsarrow-array/src/array/struct_array.rs

Calls 2

nullsMethod · 0.45
is_nullMethod · 0.45

Tested by

no test coverage detected