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

Method DecodeVarLength

cpp/src/arrow/acero/swiss_join.cc:364–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364void RowArray::DecodeVarLength(ResizableArrayData* output, int output_start_row,
365 int column_id, int num_rows_to_append,
366 const uint32_t* row_ids) const {
367 RowArrayAccessor::Visit(
368 rows_, column_id, num_rows_to_append, row_ids,
369 [&](int i, const uint8_t* ptr, uint32_t num_bytes) {
370 uint64_t* dst = reinterpret_cast<uint64_t*>(
371 output->mutable_data(2) +
372 output->mutable_data_as<uint32_t>(1)[output_start_row + i]);
373 const uint64_t* src = reinterpret_cast<const uint64_t*>(ptr);
374 // Note that both `output` and `ptr` have been allocated with enough padding to
375 // accommodate the memory overshoot. See the allocations for `ResizableArrayData`
376 // in `JoinResultMaterialize` and `JoinResidualFilter` for `output`, and
377 // `RowTableImpl::kPaddingForVectors` for `ptr`.
378 for (uint32_t word_id = 0;
379 word_id < bit_util::CeilDiv(num_bytes, sizeof(uint64_t)); ++word_id) {
380 arrow::util::SafeStore<uint64_t>(dst + word_id,
381 arrow::util::SafeLoad(src + word_id));
382 }
383 });
384}
385
386void RowArray::DecodeNulls(ResizableArrayData* output, int output_start_row,
387 int column_id, int num_rows_to_append,

Callers

nothing calls this directly

Calls 3

CeilDivFunction · 0.85
VisitFunction · 0.50
mutable_dataMethod · 0.45

Tested by

no test coverage detected