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

Function BitmapFromVector

cpp/src/arrow/util/bitmap_test.cc:59–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void BitmapFromVector(const std::vector<int>& values, int64_t bit_offset,
60 std::shared_ptr<Buffer>* out_buffer, int64_t* out_length) {
61 const int64_t length = values.size();
62 *out_length = length;
63 ASSERT_OK_AND_ASSIGN(*out_buffer, AllocateEmptyBitmap(length + bit_offset));
64 auto writer = BitmapWriter((*out_buffer)->mutable_data(), bit_offset, length);
65 WriteVectorToWriter(writer, values);
66}
67
68std::shared_ptr<Buffer> BitmapFromString(const std::string& s) {
69 TypedBufferBuilder<bool> builder;

Callers 3

TESTFunction · 0.70
TestAlignedMethod · 0.70
TestUnalignedMethod · 0.70

Calls 6

AllocateEmptyBitmapFunction · 0.85
WriteVectorToWriterFunction · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.70
BitmapWriterClass · 0.70
sizeMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected