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

Method MakeEmpty

cpp/src/arrow/record_batch.cc:241–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241Result<std::shared_ptr<RecordBatch>> RecordBatch::MakeEmpty(
242 std::shared_ptr<Schema> schema, MemoryPool* memory_pool) {
243 ArrayVector empty_batch(schema->num_fields());
244 for (int i = 0; i < schema->num_fields(); i++) {
245 ARROW_ASSIGN_OR_RAISE(empty_batch[i],
246 MakeEmptyArray(schema->field(i)->type(), memory_pool));
247 }
248 return RecordBatch::Make(std::move(schema), 0, std::move(empty_batch));
249}
250
251Result<std::shared_ptr<RecordBatch>> RecordBatch::FromStructArray(
252 const std::shared_ptr<Array>& array, MemoryPool* memory_pool) {

Callers

nothing calls this directly

Calls 6

MakeFunction · 0.70
ARROW_ASSIGN_OR_RAISEFunction · 0.50
MakeEmptyArrayFunction · 0.50
num_fieldsMethod · 0.45
typeMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected