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

Function decode_nulls

arrow-row/src/fixed.rs:420–429  ·  view source on GitHub ↗

Decodes a single byte from each row, interpreting `0x01` as a valid value and all other values as a null Returns the null count and null buffer

(rows: &[&[u8]])

Source from the content-addressed store, hash-verified

418///
419/// Returns the null count and null buffer
420pub fn decode_nulls(rows: &[&[u8]]) -> (usize, Buffer) {
421 let mut null_count = 0;
422 let buffer = MutableBuffer::collect_bool(rows.len(), |idx| {
423 let valid = rows[idx][0] == 1;
424 null_count += !valid as usize;
425 valid
426 })
427 .into();
428 (null_count, buffer)
429}
430
431/// Decodes a `ArrayData` from rows based on the provided `FixedLengthEncoding` `T`
432///

Callers 4

decode_fixedFunction · 0.85
decode_fixed_size_binaryFunction · 0.85
decode_columnFunction · 0.85
decode_fixed_size_listFunction · 0.85

Calls 2

collect_boolFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected