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

Method MakeEmpty

cpp/src/arrow/table.cc:273–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273Result<std::shared_ptr<Table>> Table::MakeEmpty(std::shared_ptr<Schema> schema,
274 MemoryPool* memory_pool) {
275 ChunkedArrayVector empty_table(schema->num_fields());
276 for (int i = 0; i < schema->num_fields(); i++) {
277 ARROW_ASSIGN_OR_RAISE(empty_table[i],
278 ChunkedArray::MakeEmpty(schema->field(i)->type(), memory_pool));
279 }
280 return Table::Make(std::move(schema), empty_table, 0);
281}
282
283Result<std::shared_ptr<Table>> Table::FromRecordBatchReader(RecordBatchReader* reader) {
284 return reader->ToTable();

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected