rust/sedona-geometry: `WraparoundInterval::merge_value()` and `WraparoundInterval::merge_interval()` need finite bounds to merge across the antimeridian
- Dominant language
- Rust
- Stars
- 503
- Forks
- 61
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 91
Description
While the current logic is correct, it does not make the smallest possible update to the intervals involved (e.g., successively merging a -179 and 179 will result in a non-wraparound interval because it does not know that the wraparound version is smaller than the non-wraparound.
https://github.com/apache/sedona-db/blob/d0be89a5e08c10766682a13f61478f67f5496776/rust/sedona-geometry/src/interval.rs#L403-L489
This is used in the statistics/bounding box merging (mostly just in the statistics merging). To do the right thing we need to pass through finite coordinate system bounds when merging these.
Contributor guide
Research direction
Read rust/sedona-geometry/src/interval.rs around lines 403-489, starting with WraparoundInterval::merge_value() and merge_interval(). Trace their callers in statistics and bounding-box merging to determine how finite coordinate-system bounds should flow through. Done means successive values such as -179 and 179 merge into the smallest wraparound interval, including interval-to-interval merging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100