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

Method ViewOrCopy

cpp/src/arrow/buffer.cc:142–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142Result<std::shared_ptr<Buffer>> Buffer::ViewOrCopy(
143 std::shared_ptr<Buffer> source, const std::shared_ptr<MemoryManager>& to) {
144 auto maybe_buffer = MemoryManager::ViewBuffer(source, to);
145 if (maybe_buffer.ok()) {
146 return maybe_buffer;
147 }
148 return MemoryManager::CopyBuffer(source, to);
149}
150
151std::shared_ptr<Buffer> Buffer::FromString(std::string data) {
152 if (data.empty()) {

Callers

nothing calls this directly

Calls 1

okMethod · 0.45

Tested by

no test coverage detected