test(rust/sedona-raster-functions): Add multi-band regression tests for RS_* raster functions#747
Merged
paleolimbot merged 4 commits intoApr 2, 2026
Conversation
paleolimbot
reviewed
Mar 31, 2026
Lock in behavioral contracts for all 33 RS_* functions before the N-D raster type migration. These tests verify exact outputs so that any schema/trait changes that alter observable behavior will be caught immediately.
Move regression tests from src/regression_tests.rs to tests/regression_tests.rs per review feedback. Fix clippy warnings and formatting.
3cd2df7 to
cde0edb
Compare
Replace standalone regression_tests.rs with targeted tests in the modules where gaps existed: - sedona-testing: add generate_multi_band_raster() helper (3 bands: UInt8/UInt16/Float32 with different nodata) and round-trip test - rs_numbands: add multi-band test verifying count=3 - rs_band_accessors: add multi-band tests for RS_BandPixelType and RS_BandNoDataValue verifying per-band heterogeneous types and nodata
paleolimbot
approved these changes
Apr 1, 2026
Member
paleolimbot
left a comment
There was a problem hiding this comment.
Thank you!
There's one CI fix needed (cargo clippy --fix should do it, or you can configure an editor like VSCOde to use cargo clippy as the linting command). Hopefully CI will run automatically for you after this merges.
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
generate_multi_band_raster()helper tosedona-testing— 3-band raster with heterogeneous types (UInt8/UInt16/Float32) and different nodata valuesrs_numbands: verifies band count = 3rs_band_accessors: verifies RS_BandPixelType and RS_BandNoDataValue return correct per-band values across heterogeneous bandsPre-work for the N-Dimensional Raster Type Extension. The migration will replace the raster Arrow schema, traits, builder, and reader — these tests cover gaps in multi-band coverage so behavioral changes are caught.
Test plan
cargo test -p sedona-raster-functions— 143 tests pass (140 existing + 3 new)cargo test -p sedona-testing test_generate_multi_band— round-trip test passescargo clippy— no new warnings