feat(vortex-geo): add native geoarrow.box bounding-box type#8746
Conversation
Add the `Rect` extension type (`vortex.geo.box`, GeoArrow's `geoarrow.box`): an axis-aligned envelope stored as `Struct<xmin, ymin[, zmin][, mmin], xmax, ymax[, zmax][, mmax]>` of non-nullable f64, supporting all four GeoArrow dimensions in storage and the arrow round-trip. Named `Rect` (not `Box`) to match `geo::Rect` / geoarrow-rs `RectArray`. Wired into `is_native_geometry` and the `geometries()` decode dispatch, so the existing geo scalar functions (GeoDistance/GeoIntersects/GeoContains) accept a box operand and reuse their kernels on it — decoding to a 2D `geo_types::Geometry::Rect` (z/m dropped, as for the other types). This is the foundation for the geometry-bounds zone-map stat to emit a native box column and have the pruning rules reuse those kernels. Signed-off-by: Nemo Yu <zyu379@wisc.edu>
| session.dtypes().register(Rect); | ||
| session.arrow().register_exporter(Arc::new(Rect)); |
There was a problem hiding this comment.
surely we can write a helper functiuon that makes this nice :D
|
@claude please review this |
|
Claude finished @connortsui20's task in 1m 42s —— View job PR Review:
|
Merging this PR will not alter performance
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
connortsui20
left a comment
There was a problem hiding this comment.
as stated offline I think this is fine but I think the code could be a bit cleaner if you used the matcher pattern we have (like in vortex-tensor).
Once you fix the rustdoc error I think this is fine to merge
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Rationale for this change
Groundwork for spatial chunk-pruning: the upcoming geometry-bounds zone-map needs to store bounding boxes as a first-class geometry so the pruning rules can reuse the existing
ST_Distance/ST_Intersects/ST_Containskernels on them instead of hand-rolled box math.What changes are included in this PR?
Rectextension type (vortex.geo.box, GeoArrow'sgeoarrow.box): an axis-aligned box stored asStruct<xmin, ymin[, zmin][, mmin], xmax, ymax[, zmax][, mmax]>of non-nullablef64.