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

Method CreateBuffer

cpp/src/arrow/array/util.cc:454–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452 : pool_(pool), type_(type), length_(length) {}
453
454 Status CreateBuffer() {
455 if (type_->id() == Type::RUN_END_ENCODED) {
456 buffer_ = NULLPTR;
457 return Status::OK();
458 }
459 ARROW_ASSIGN_OR_RAISE(int64_t buffer_length,
460 GetBufferLength(type_, length_).Finish());
461 ARROW_ASSIGN_OR_RAISE(buffer_, AllocateBuffer(buffer_length, pool_));
462 std::memset(buffer_->mutable_data(), 0, buffer_->size());
463 return Status::OK();
464 }
465
466 Result<std::shared_ptr<ArrayData>> Create() {
467 if (buffer_ == nullptr) {

Callers

nothing calls this directly

Calls 6

OKFunction · 0.50
ARROW_ASSIGN_OR_RAISEFunction · 0.50
AllocateBufferFunction · 0.50
idMethod · 0.45
mutable_dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected