Skip to content

feat(rust/sedona-testing): add ergonomic raster function test harness#945

Draft
james-willis wants to merge 1 commit into
apache:mainfrom
james-willis:jw/raster-test-harness
Draft

feat(rust/sedona-testing): add ergonomic raster function test harness#945
james-willis wants to merge 1 commit into
apache:mainfrom
james-willis:jw/raster-test-harness

Conversation

@james-willis

Copy link
Copy Markdown
Contributor

No description provided.

Adds RasterSpec, a terse declarative raster fixture (the raster analog of
WKT for geometry tests), plus tester and assertion plumbing:

- RasterSpec::d2/nd with band/band_values/band_nd/nodata/name/outdb
  modifiers, sequential default pixel fill, and a PixelValue trait for
  typed pixel data (little-endian)
- raster_array() for multi-row inputs with null rasters
- ScalarUdfTester::invoke_raster_scalar/invoke_raster_array/
  invoke_raster_array_scalar and a raster Literal path through scalar_lit
- AggregateUdfTester::aggregate_rasters for future raster aggregates
- Raster-aware assert_scalar_equal/assert_array_equal (null rows compared
  by validity, mismatches reported per-field instead of a struct dump)
- list_utf8_row/list_i64_row/band_pixels extractors for common return
  shapes
- Retrofit rs_bandpath and rs_band_accessors tests as demos
- Parameterized end-to-end Python tests for RS_ functions over a Zarr
  fixture, with a gated probe documenting that the Zarr byte loader is
  not yet reachable from RS_EnsureLoaded in Python
@github-actions github-actions Bot requested a review from paleolimbot June 12, 2026 01:47

@paleolimbot paleolimbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks for working on it! Feel free to ignore any of this if you're still working through changes

Comment on lines +221 to +226
/// Override the GDAL geotransform
/// `[origin_x, scale_x, skew_x, origin_y, skew_y, scale_y]`.
pub fn transform(mut self, transform: [f64; 6]) -> Self {
self.transform = transform;
self
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to do this here, but Wwhen we get to some more spatial interactions, setting this from a BoundingBox might also be nice

Comment on lines +22 to +23
@pytest.fixture
def zarr_group(tmp_path):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to find a way to have an ND fixture without the zarr dependency (for the sedonadb package...for sedonadb-zarr this will be great)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is just Fable's first go, I havent even look at this code yet. probably will just use numpy for creating rasters

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.

2 participants