Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlatGeoBuf: ArrowStream: return a released array when there are no rows #8512

Merged
merged 3 commits into from
Oct 3, 2023

Conversation

rouault
Copy link
Member

@rouault rouault commented Oct 3, 2023

Fixes #8509

@jorisvandenbossche
I've decided to uniformize the behavior of all drivers to immediately return a released array when there are no rows. The GeoPackage one was for example returning a non-released empty batch at the first iteration and then a released batch.

@jorisvandenbossche
Copy link
Contributor

That sounds good, I don't think it's important (or useful) to return an empty batch instead of no batch at all

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 67.684% (-0.001%) from 67.685% when pulling 15bf9a1 on rouault:fix_8509 into f0095ee on OSGeo:master.

@rouault rouault merged commit e94c57b into OSGeo:master Oct 3, 2023
30 checks passed
@rouault
Copy link
Member Author

rouault commented Oct 3, 2023

The backport to release/3.7 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 98f923872e... GPKG: ArrowStream: immediately return a release array when there are no rows (refs #8509)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging autotest/ogr/ogr_flatgeobuf.py
Auto-merging ogr/ogrsf_frmts/flatgeobuf/ogrflatgeobuflayer.cpp
[backport-8512-to-release/3.7 f38fffc1b5] FlatGeoBuf: ArrowStream: return a released array when there are no rows (fixes #8509)
 Author: Even Rouault <even.rouault@spatialys.com>
 Date: Tue Oct 3 12:10:01 2023 +0200
 2 files changed, 25 insertions(+), 1 deletion(-)
Auto-merging autotest/ogr/ogr_gpkg.py
CONFLICT (content): Merge conflict in autotest/ogr/ogr_gpkg.py
Auto-merging ogr/ogrsf_frmts/gpkg/ogrgeopackagelayer.cpp
Auto-merging ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.7 release/3.7
# Navigate to the new working tree
cd .worktrees/backport-release/3.7
# Create a new branch
git switch --create backport-8512-to-release/3.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 1e2917cfd3cd2528647ef45aaec904e36f708203,98f923872e1ad74ff66eb720c1c42af63f79d7ee,15bf9a19a67c6670d82afacf473dd5298cc451cb
# Push it to GitHub
git push --set-upstream origin backport-8512-to-release/3.7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.7

Then, create a pull request where the base branch is release/3.7 and the compare/head branch is backport-8512-to-release/3.7.

@rouault
Copy link
Member Author

rouault commented Oct 3, 2023

manually backported to 3.7 in ce1eca1, 48f46f8 and 3d0ba02

@rouault rouault added this to the 3.7.3 milestone Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arrow interface: reading empty FlatGeobuf file results in infinite stream
3 participants