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

Method BatchOf

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

Source from the content-addressed store, hash-verified

1430}
1431
1432std::shared_ptr<arrow::RecordBatch> RandomArrayGenerator::BatchOf(
1433 const FieldVector& fields, int64_t length, int64_t alignment,
1434 MemoryPool* memory_pool) {
1435 std::vector<std::shared_ptr<Array>> arrays(fields.size());
1436 for (size_t i = 0; i < fields.size(); i++) {
1437 const auto& field = fields[i];
1438 arrays[i] = ArrayOf(*field, length, alignment, memory_pool);
1439 }
1440 return RecordBatch::Make(schema(fields), length, std::move(arrays));
1441}
1442
1443std::shared_ptr<arrow::Array> GenerateArray(const Field& field, int64_t length,
1444 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