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

Method Create

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

Source from the content-addressed store, hash-verified

465 }
466
467 Result<std::shared_ptr<ArrayData>> Create() {
468 if (buffer_ == nullptr) {
469 RETURN_NOT_OK(CreateBuffer());
470 }
471 std::vector<std::shared_ptr<ArrayData>> child_data(type_->num_fields());
472 auto buffer_slice =
473 buffer_ ? SliceBuffer(buffer_, 0, bit_util::BytesForBits(length_)) : NULLPTR;
474 out_ = ArrayData::Make(type_, length_, {std::move(buffer_slice)}, child_data, length_,
475 0);
476 RETURN_NOT_OK(VisitTypeInline(*type_, this));
477 return out_;
478 }
479
480 Status Visit(const NullType&) {
481 out_->buffers.resize(1, nullptr);

Callers 2

CreateChildMethod · 0.45
MakeArrayFromScalarFunction · 0.45

Calls 5

SliceBufferFunction · 0.85
BytesForBitsFunction · 0.85
VisitTypeInlineFunction · 0.85
MakeFunction · 0.70
num_fieldsMethod · 0.45

Tested by

no test coverage detected