| 239 | } |
| 240 | |
| 241 | Result<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 | |
| 251 | Result<std::shared_ptr<RecordBatch>> RecordBatch::FromStructArray( |
| 252 | const std::shared_ptr<Array>& array, MemoryPool* memory_pool) { |
nothing calls this directly
no test coverage detected