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

Function ReplaceBuffersInDictionary

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

Source from the content-addressed store, hash-verified

3738}
3739
3740std::shared_ptr<ArrayData> ReplaceBuffersInDictionary(
3741 const std::shared_ptr<ArrayData>& data, const int32_t buffer_index,
3742 const std::vector<uint8_t>& buffer_data) {
3743 const auto test_data = data->Copy();
3744 auto dict_array_data = test_data->dictionary->Copy();
3745 dict_array_data->buffers[buffer_index] =
3746 std::make_shared<Buffer>(buffer_data.data(), buffer_data.size());
3747 test_data->dictionary = dict_array_data;
3748 return test_data;
3749}
3750
3751TEST(TestSwapEndianArrayData, BinaryType) {
3752 auto array = ArrayFromJSON(binary(), R"(["0123", null, "45"])");

Callers 1

array_test.ccFile · 0.85

Calls 3

CopyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected