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

Function ExampleRecordBatch

cpp/src/arrow/c/bridge_benchmark.cc:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46std::shared_ptr<RecordBatch> ExampleRecordBatch() {
47 // We don't care about the actual data, since it's exported as raw buffer pointers
48 auto schema = ExampleSchema();
49 int64_t length = 1000;
50 std::vector<std::shared_ptr<Array>> columns;
51 for (const auto& field : schema->fields()) {
52 auto array = *MakeArrayOfNull(field->type(), length);
53 columns.push_back(array);
54 }
55 return RecordBatch::Make(schema, length, columns);
56}
57
58static void ExportType(benchmark::State& state) { // NOLINT non-const reference
59 struct ArrowSchema c_export;

Callers 2

ExportRecordBatchFunction · 0.85
ExportImportRecordBatchFunction · 0.85

Calls 6

ExampleSchemaFunction · 0.85
MakeArrayOfNullFunction · 0.85
push_backMethod · 0.80
MakeFunction · 0.50
fieldsMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected