You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 956c1ea
Browse filesBrowse the repository at this point in the historyBrowse files
Reject nullable nested levels in list-based spatial types (#11183)
## Summary
- Tracking Issue: #11114
GeoArrow only allows nulls at the outer level of a geometry, but the
validators of the list-based spatial types only checked the coordinate
fields, so `LineString` also accepted `list({x=f64, y=f64}?)`.
`LineString`, `MultiPoint`, `Polygon`, `MultiLineString`, and
`MultiPolygon` now accept only the storage that their helper builds, at
either top-level nullability. That leaves each type one storage form for
each dimension, which the storage declarations (SD in #11114) need.
## Changes
Each validator compares the stored dtype with its storage helper, so the
helpers stay the only definition of the form. `Point` and `Rect` already
rejected nullable coordinate fields, and WKB has no nested level. Tests
cover every nested level of each type, and reading a serialized
`vortex.st.linestring` whose coordinate `Struct` is nullable.
## API Changes
Building one of these five types with a nullable inner `List` or
coordinate `Struct` (e.g., with `ExtDType::try_new`) now returns an
error, and so does reading a dtype in that form. No Vortex writer
produces that form, so only storage built by hand through the Rust API
can hit it.
Note that a file keeps its columns as fields of a struct whose field
dtypes are parsed lazily, so reading such a column from a file currently
panics instead of returning the error. A follow-up fixes that.
Signed-off-by: Connor Tsui <[email protected]>
0 commit comments