| 2053 | } |
| 2054 | |
| 2055 | Status ExportStreamNext(const std::shared_ptr<RecordBatchReader>& src, int64_t i, |
| 2056 | struct ArrowArray* out_array) { |
| 2057 | std::shared_ptr<RecordBatch> batch; |
| 2058 | RETURN_NOT_OK(src->ReadNext(&batch)); |
| 2059 | if (batch == nullptr) { |
| 2060 | // End of stream |
| 2061 | ArrowArrayMarkReleased(out_array); |
| 2062 | return Status::OK(); |
| 2063 | } else { |
| 2064 | return ExportRecordBatch(*batch, out_array); |
| 2065 | } |
| 2066 | } |
| 2067 | |
| 2068 | // the int64_t i input here is unused, but exists simply to allow utilizing the |
| 2069 | // overload of this with the version for ChunkedArrays. If we removed the int64_t |
no test coverage detected