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

Method Create

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

Source from the content-addressed store, hash-verified

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