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

Function MakeArray

cpp/src/arrow/testing/builder.h:150–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149template <class T, class Builder>
150Status MakeArray(const std::vector<uint8_t>& valid_bytes, const std::vector<T>& values,
151 int64_t size, Builder* builder, std::shared_ptr<Array>* out) {
152 // Append the first 1000
153 for (int64_t i = 0; i < size; ++i) {
154 if (valid_bytes[i] > 0) {
155 RETURN_NOT_OK(builder->Append(values[i]));
156 } else {
157 RETURN_NOT_OK(builder->AppendNull());
158 }
159 }
160 return builder->Finish(out);
161}
162
163template <typename Fn>
164struct VisitBuilder {

Callers 3

TweakValidityBitFunction · 0.70
UnalignBuffersFunction · 0.70
GenerateMethod · 0.70

Calls 3

AppendMethod · 0.45
AppendNullMethod · 0.45
FinishMethod · 0.45

Tested by 2

TweakValidityBitFunction · 0.56
UnalignBuffersFunction · 0.56