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

Function DoTotalBufferSize

cpp/src/arrow/util/byte_size.cc:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40namespace {
41
42int64_t DoTotalBufferSize(const ArrayData& array_data,
43 std::unordered_set<const uint8_t*>* seen_buffers) {
44 int64_t sum = 0;
45 for (const auto& buffer : array_data.buffers) {
46 if (buffer && seen_buffers->insert(buffer->data()).second) {
47 sum += buffer->size();
48 }
49 }
50 for (const auto& child : array_data.child_data) {
51 sum += DoTotalBufferSize(*child, seen_buffers);
52 }
53 if (array_data.dictionary) {
54 sum += DoTotalBufferSize(*array_data.dictionary, seen_buffers);
55 }
56 return sum;
57}
58
59int64_t DoTotalBufferSize(const Array& array,
60 std::unordered_set<const uint8_t*>* seen_buffers) {

Callers 1

TotalBufferSizeFunction · 0.85

Calls 5

columnsMethod · 0.80
insertMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
chunksMethod · 0.45

Tested by

no test coverage detected