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

Method CreateOffsetsBuffer

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

Source from the content-addressed store, hash-verified

853
854 template <typename OffsetType>
855 Status CreateOffsetsBuffer(OffsetType value_length, std::shared_ptr<Buffer>* out) {
856 TypedBufferBuilder<OffsetType> builder(pool_);
857 RETURN_NOT_OK(builder.Resize(length_ + 1));
858 OffsetType offset = 0;
859 for (int64_t i = 0; i < length_ + 1; ++i, offset += value_length) {
860 builder.UnsafeAppend(offset);
861 }
862 return builder.Finish(out);
863 }
864
865 template <typename IntType>
866 Result<std::shared_ptr<Buffer>> CreateIntBuffer(IntType value) {

Callers

nothing calls this directly

Calls 3

ResizeMethod · 0.45
UnsafeAppendMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected