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

Function ReplaceBuffersInChild

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

Source from the content-addressed store, hash-verified

3726}
3727
3728std::shared_ptr<ArrayData> ReplaceBuffersInChild(const std::shared_ptr<ArrayData>& data,
3729 const int32_t child_index,
3730 const std::vector<uint8_t>& child_data) {
3731 const auto test_data = data->Copy();
3732 // assume updating only buffer[1] in child_data
3733 auto child_array_data = test_data->child_data[child_index]->Copy();
3734 child_array_data->buffers[1] =
3735 std::make_shared<Buffer>(child_data.data(), child_data.size());
3736 test_data->child_data[child_index] = child_array_data;
3737 return test_data;
3738}
3739
3740std::shared_ptr<ArrayData> ReplaceBuffersInDictionary(
3741 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