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

Function CopyValuesAllValid

cpp/src/arrow/compute/kernels/scalar_if_else.cc:2030–2046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2028// Helper: copy from a source value into all null slots of the output
2029template <typename Type>
2030void CopyValuesAllValid(const ExecValue& source, uint8_t* out_valid, uint8_t* out_values,
2031 const int64_t out_offset, const int64_t length) {
2032 BitRunReader bit_reader(out_valid, out_offset, length);
2033 int64_t offset = 0;
2034 while (true) {
2035 const auto run = bit_reader.NextRun();
2036 if (run.length == 0) {
2037 break;
2038 }
2039 if (!run.set) {
2040 CopyValues<Type>(source, offset, run.length, out_valid, out_values,
2041 out_offset + offset);
2042 }
2043 offset += run.length;
2044 }
2045 DCHECK_EQ(offset, length);
2046}
2047
2048// Helper: zero the values buffer of the output wherever the slot is null
2049void InitializeNullSlots(const DataType& type, uint8_t* out_valid, uint8_t* out_values,

Callers

nothing calls this directly

Calls 1

NextRunMethod · 0.45

Tested by

no test coverage detected