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

Function ReplaceBuffersInChild

cpp/src/arrow/array/array_test.cc:3678–3688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3676}
3677
3678std::shared_ptr<ArrayData> ReplaceBuffersInChild(const std::shared_ptr<ArrayData>& data,
3679 const int32_t child_index,
3680 const std::vector<uint8_t>& child_data) {
3681 const auto test_data = data->Copy();
3682 // assume updating only buffer[1] in child_data
3683 auto child_array_data = test_data->child_data[child_index]->Copy();
3684 child_array_data->buffers[1] =
3685 std::make_shared<Buffer>(child_data.data(), child_data.size());
3686 test_data->child_data[child_index] = child_array_data;
3687 return test_data;
3688}
3689
3690std::shared_ptr<ArrayData> ReplaceBuffersInDictionary(
3691 const std::shared_ptr<ArrayData>& data, const int32_t buffer_index,

Callers 1

array_test.ccFile · 0.85

Calls 3

CopyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected