| 579 | |
| 580 | private: |
| 581 | Status PrepareForContentsWrite() { |
| 582 | // Only called once, as part of initialization |
| 583 | if (data_buffer_ == nullptr) { |
| 584 | ARROW_ASSIGN_OR_RAISE( |
| 585 | data_buffer_, |
| 586 | AllocateResizableBuffer( |
| 587 | options_.batch_size * schema_->num_fields() * kColumnSizeGuess, |
| 588 | options_.io_context.pool())); |
| 589 | } |
| 590 | return Status::OK(); |
| 591 | } |
| 592 | |
| 593 | // GH-36889: Flush buffer to sink and clear it to avoid stale content |
| 594 | // being written again if the next batch is empty. |
no test coverage detected