MCPcopy Create free account
hub / github.com/apache/arrow / CopyNonNullValues

Function CopyNonNullValues

cpp/src/arrow/compute/kernels/util_internal.h:115–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113// Copy numerical array values to a buffer, ignore nulls.
114template <typename T>
115ARROW_NOINLINE int64_t CopyNonNullValues(const ArraySpan& data, T* out) {
116 const int64_t n = data.length - data.GetNullCount();
117 if (n > 0) {
118 int64_t index = 0;
119 const T* values = data.GetValues<T>(1);
120 arrow::internal::VisitSetBitRunsVoid(
121 data.buffers[0].data, data.offset, data.length, [&](int64_t pos, int64_t len) {
122 memcpy(out + index, values + pos, len * sizeof(T));
123 index += len;
124 });
125 }
126 return n;
127}
128
129template <typename T>
130int64_t CopyNonNullValues(const ChunkedArray& arr, T* out) {

Callers 2

ComputeModeMethod · 0.85
FillBufferMethod · 0.85

Calls 4

VisitSetBitRunsVoidFunction · 0.85
GetNullCountMethod · 0.80
chunksMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected