Skip to content

refactor(rust/sedona-raster): add RasterError to replace ArrowError plumbing - #1144

Draft
james-willis wants to merge 1 commit into
mainfrom
jw/raster-error-type
Draft

refactor(rust/sedona-raster): add RasterError to replace ArrowError plumbing#1144
james-willis wants to merge 1 commit into
mainfrom
jw/raster-error-type

Conversation

@james-willis

Copy link
Copy Markdown
Contributor

Introduces a dedicated RasterError for the raster crates (mirroring sedona-geometry's SedonaGeometryError) so error plumbing is ?/.context()-based instead of manual ArrowError map_err.

…lumbing

The raster crates leaned on arrow_schema::ArrowError as their error type,
forcing a map_err at every boundary. Introduce a dedicated RasterError
(mirroring sedona-geometry's SedonaGeometryError, plus an Arrow(#[from])
variant since raster code calls Arrow constantly) with From bridges into
DataFusionError and ArrowError and from DataFusionError, and a
RasterResultExt::context() helper. Migrate the sedona-raster library
modules to return RasterError and collapse the downstream map_err churn in
sedona-raster-{functions,gdal,zarr} to ?/.context(). The AsyncRasterLoader
trait stays on ArrowError to keep that cross-crate/cross-language boundary
stable; internal-assertion errors still route through sedona_internal_err!.
@github-actions
github-actions Bot requested a review from zhangfengcdt August 10, 2026 20:14
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.

1 participant