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

Method array_data

cpp/src/arrow/compute/light_array_internal.cc:349–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349std::shared_ptr<ArrayData> ResizableArrayData::array_data() const {
350 auto valid_count =
351 arrow::internal::CountSetBits(buffers_[kValidityBuffer]->data(), /*bit_offset=*/0,
352 static_cast<int64_t>(num_rows_));
353 int null_count = static_cast<int>(num_rows_) - static_cast<int>(valid_count);
354
355 if (column_metadata_.is_fixed_length) {
356 return ArrayData::Make(data_type_, num_rows_,
357 {buffers_[kValidityBuffer], buffers_[kFixedLengthBuffer]},
358 null_count);
359 } else {
360 return ArrayData::Make(data_type_, num_rows_,
361 {buffers_[kValidityBuffer], buffers_[kFixedLengthBuffer],
362 buffers_[kVariableLengthBuffer]},
363 null_count);
364 }
365}
366
367int ExecBatchBuilder::NumRowsToSkip(const std::shared_ptr<ArrayData>& column,
368 int num_rows, const uint16_t* row_ids,

Callers 15

FlushBuildColumnMethod · 0.80
TESTFunction · 0.80
ExecCopyArrayDataFunction · 0.80
ExecNoPreallocatedDataFunction · 0.80
lengthFunction · 0.80
typeFunction · 0.80
ExecuteNonSpansMethod · 0.80
ExecMethod · 0.80
FlushMethod · 0.80
CastToDictionaryFunction · 0.80

Calls 3

CountSetBitsFunction · 0.50
MakeFunction · 0.50
dataMethod · 0.45

Tested by 4

TESTFunction · 0.64
ExecCopyArrayDataFunction · 0.64
ExecNoPreallocatedDataFunction · 0.64