james-willis commented on code in PR #749:
URL: https://github.com/apache/sedona-db/pull/749#discussion_r3228726682
##########
rust/sedona-raster-functions/src/rs_band_accessors.rs:
##########
@@ -120,14 +120,15 @@ fn get_pixel_type(
Ok(())
}
Some(raster) => {
- let num_bands = raster.bands().len();
+ let num_bands = raster.num_bands();
if band_index < 1 || band_index > num_bands as i32 {
builder.append_null();
return Ok(());
}
- let band = raster.bands().band(band_index as usize)?;
- let dt = band.metadata().data_type()?;
- builder.append_value(dt.pixel_type_name());
+ match raster.band_data_type((band_index - 1) as usize) {
+ Some(dt) => builder.append_value(dt.pixel_type_name()),
+ None => builder.append_null(),
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]