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

Method CreateOffsetsBuffer

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

Source from the content-addressed store, hash-verified

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