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

Method MakeEmpty

cpp/src/arrow/table.cc:272–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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