feat(python/sedonadb): Support specifying layer name and accessing sub-paths inside archives when working with pyogrio sources.#778
Merged
paleolimbot merged 4 commits intoapache:mainfrom Apr 23, 2026
Conversation
paleolimbot
reviewed
Apr 22, 2026
Member
paleolimbot
left a comment
There was a problem hiding this comment.
Thank you!
In CI I see:
# column comparison
> assert_index_equal(
left.columns, right.columns, exact=check_column_type, obj="GeoDataFrame.columns"
)
E AssertionError: GeoDataFrame.columns are different
E
E GeoDataFrame.columns values are different (50.0 %)
E [left]: Index(['val', 'geom'], dtype='str')
E [right]: Index(['val', 'wkb_geometry'], dtype='str')and left a few suggestions for how to fix the test. I'm never quite sure what the name of a geometry column will be when I write or read a GeoDataFrame (everybody chooses something different for the "no geometry column name" case).
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
pwrliang
pushed a commit
to wherobots/sedona-db-gpu-tester
that referenced
this pull request
Apr 24, 2026
…b-paths inside archives when working with pyogrio sources. (apache#778) Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables passing pyogrio keyword arguments (e.g.,
layer,where,sql,max_features) throughread_pyogrio(options=...)by switching from the internalpyogrio.raw.ogr_open_arrow()to the publicpyogrio.raw.open_arrow()API, which accepts these as keyword arguments directly including specifying thelayer=flag to handle multi-layer files (python/sedonadb: No mechanism to pass layer parameter to read_pyogrio #772)Adds a
path_suffixoption to append a subpath to the resolved GDAL source, enabling reading of formats like FileGeoDatabase (.gdb) stored inside.ziparchives (e.g.,options={"path_suffix": 'subdir/test.gdb')). This is equivalent to runningogrinfo /vsizip/test.zip/subdir/test.gdb.Motivation
Previously,
read_pyogrio()had no way to pass options through to pyogrio, making it impossible to select a specific layer in a multi-layer file or use GDAL driver-specific open options. For example, reading a named layer from a GeoPackage now works:For formats like FileGeoDatabase distributed inside .zip archives, GDAL expects a path of the form
/vsizip/archive.zip/data.gdb. Because the file listing infrastructure resolves real filesystem paths before the Python reader runs, passing a full/vsizip/...path directly fails. The path_suffix option bridges this gap: