MCPcopy Create free account
hub / github.com/apache/datafusion / get_count_with_validity

Function get_count_with_validity

datafusion/functions-nested/src/repeat.rs:315–322  ·  view source on GitHub ↗
(count_array: &Int64Array, idx: usize)

Source from the content-addressed store, hash-verified

313/// Return 0 for null values or non-positive count.
314#[inline]
315fn get_count_with_validity(count_array: &Int64Array, idx: usize) -> usize {
316 if count_array.is_null(idx) {
317 0
318 } else {
319 let c = count_array.value(idx);
320 if c > 0 { c as usize } else { 0 }
321 }
322}

Callers 2

general_repeatFunction · 0.85
general_list_repeatFunction · 0.85

Calls 2

is_nullMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…