You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "james-willis (via GitHub)" <gi...@apache.org> on 2026/06/08 22:14:34 UTC
[PR] refactor(raster): source_shape i64 end-to-end (in-memory + Arrow column) [sedona-db]
james-willis opened a new pull request, #927:
URL: https://github.com/apache/sedona-db/pull/927
Converts the raster band `source_shape` / visible-shape surface from `u64` to `i64` — both the in-memory representation and the Arrow `source_shape` column (`List<UInt64>` → `List<Int64>`).
### Why
The view/stride machinery (`ViewEntry`, byte strides) is already `i64` (signed, for negative-step / reverse views). Keeping `source_shape` as `u64` forces mixed signed/unsigned arithmetic at every shape↔stride boundary; making the shape `i64` end-to-end removes those casts and lets view composition use uniform signed math.
This is an **Arrow schema change** to the raster type (`source_shape` column element type `UInt64` → `Int64`), landed before the format stabilizes so we don't ship `u64` and break it later.
### Scope
- In-memory: `NdBuffer.shape`, `BandRef::shape()` / `raw_source_shape()` / `dim_size()`, and `RasterLoadRequest`/`RasterLoadResult.source_shape`.
- Arrow column: `RasterSchema::source_shape_type()` → `List<Int64>`; the builder writes `Int64`, the reader downcasts `Int64Array`.
- `spatial_shape` was already `i64` and is untouched.
- Behavior-preserving — shape values are non-negative. `u64`/`usize` casts are confined to byte-cap checks and buffer-index boundaries; the zarrs `chunk_shape` (`u64`) is cast at the `start_band_nd` call site.
### Tests
All raster-crate suites pass (`sedona-schema` / `sedona-raster` / `-gdal` / `-functions` / `-zarr` / `-testing`), clippy clean, fmt clean.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(raster): source_shape i64 end-to-end (in-memory + Arrow column) [sedona-db]
Posted by "james-willis (via GitHub)" <gi...@apache.org>.
james-willis commented on PR #927:
URL: https://github.com/apache/sedona-db/pull/927#issuecomment-4654155471
@paleolimbot What do you think of changing `RasterRef::width()/height() -> Result<u64>` to return signed ?
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(rust/sedona-raster,rust/sedona-schema): source_shape i64 end-to-end (in-memory + Arrow column) [sedona-db]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot merged PR #927:
URL: https://github.com/apache/sedona-db/pull/927
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(raster): source_shape i64 end-to-end (in-memory + Arrow column) [sedona-db]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #927:
URL: https://github.com/apache/sedona-db/pull/927#issuecomment-4660664147
> What do you think of changing RasterRef::width()/height() -> Result<u64> to return signed ?
I think that is a good idea. There may be some UDFs that return u64s that should probably return i64s as well.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(raster): source_shape i64 end-to-end (in-memory + Arrow column) [sedona-db]
Posted by "james-willis (via GitHub)" <gi...@apache.org>.
james-willis commented on PR #927:
URL: https://github.com/apache/sedona-db/pull/927#issuecomment-4662984103
> > What do you think of changing RasterRef::width()/height() -> Result to return signed ?
>
> I think that is a good idea. There may be some UDFs that return u64s that should probably return i64s as well.
https://github.com/apache/sedona-db/pull/932
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org