| 270 | } |
| 271 | |
| 272 | Result<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 | |
| 282 | Result<std::shared_ptr<Table>> Table::FromRecordBatchReader(RecordBatchReader* reader) { |
| 283 | return reader->ToTable(); |
nothing calls this directly
no test coverage detected