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

Function MakeBooleanBatchSized

cpp/src/arrow/ipc/test_common.cc:265–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265Status MakeBooleanBatchSized(const int length, std::shared_ptr<RecordBatch>* out) {
266 // Make the schema
267 auto f0 = field("f0", boolean());
268 auto f1 = field("f1", boolean());
269 auto schema = ::arrow::schema({f0, f1});
270
271 std::shared_ptr<Array> a0, a1;
272 RETURN_NOT_OK(MakeRandomBooleanArray(length, true, &a0));
273 RETURN_NOT_OK(MakeRandomBooleanArray(length, false, &a1));
274 *out = RecordBatch::Make(schema, length, {a0, a1});
275 return Status::OK();
276}
277
278Status MakeBooleanBatch(std::shared_ptr<RecordBatch>* out) {
279 return MakeBooleanBatchSized(1000, out);

Callers 2

MakeBooleanBatchFunction · 0.85
TEST_PFunction · 0.85

Calls 5

MakeRandomBooleanArrayFunction · 0.85
schemaFunction · 0.70
fieldFunction · 0.50
MakeFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected