Skip to content

Commit

Permalink
OGRLayer::GetArrowStream(): do not issue ResetReading() at beginning …
Browse files Browse the repository at this point in the history
…of iteration, but at end instead, so SetNextByIndex() can be honoured
  • Loading branch information
rouault committed Sep 2, 2023
1 parent 15ad2b4 commit 248cf60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ogr/ogrsf_frmts/generic/ogrlayerarrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,8 @@ void OGRLayer::ReleaseStream(struct ArrowArrayStream *stream)
static_cast<ArrowArrayStreamPrivateDataSharedDataWrapper *>(
stream->private_data);
poPrivate->poShared->m_bArrowArrayStreamInProgress = false;
if (poPrivate->poShared->m_poLayer)
poPrivate->poShared->m_poLayer->ResetReading();
delete poPrivate;
stream->private_data = nullptr;
stream->release = nullptr;
Expand Down Expand Up @@ -1865,8 +1867,6 @@ bool OGRLayer::GetArrowStream(struct ArrowArrayStream *out_stream,
}
m_aosArrowArrayStreamOptions.Assign(CSLDuplicate(papszOptions), true);

ResetReading();

out_stream->get_schema = OGRLayer::StaticGetArrowSchema;
out_stream->get_next = OGRLayer::StaticGetNextArrowArray;
out_stream->get_last_error = OGRLayer::GetLastErrorArrowArrayStream;
Expand Down

0 comments on commit 248cf60

Please sign in to comment.