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

Method BatchOf

cpp/src/arrow/testing/random.cc:1423–1432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421}
1422
1423std::shared_ptr<arrow::RecordBatch> RandomArrayGenerator::BatchOf(
1424 const FieldVector& fields, int64_t length, int64_t alignment,
1425 MemoryPool* memory_pool) {
1426 std::vector<std::shared_ptr<Array>> arrays(fields.size());
1427 for (size_t i = 0; i < fields.size(); i++) {
1428 const auto& field = fields[i];
1429 arrays[i] = ArrayOf(*field, length, alignment, memory_pool);
1430 }
1431 return RecordBatch::Make(schema(fields), length, std::move(arrays));
1432}
1433
1434std::shared_ptr<arrow::Array> GenerateArray(const Field& field, int64_t length,
1435 SeedType seed, int64_t alignment,

Callers 8

TEST_FFunction · 0.80
TEST_FFunction · 0.80
MakeRandomBatchesFunction · 0.80
TESTFunction · 0.80
GenerateBatchFunction · 0.80
TESTFunction · 0.80

Calls 3

MakeFunction · 0.50
schemaFunction · 0.50
sizeMethod · 0.45

Tested by 6

TEST_FFunction · 0.64
TEST_FFunction · 0.64
MakeRandomBatchesFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64