Commit 72aa947
committed
feat(vortex-geo): per-row bounding-box scalar function (vortex.geo.envelope)
`GeoEnvelope` computes the per-row 2-D axis-aligned bounding box of a native
geometry column, returned as a native geoarrow.box (`Rect`) column — the
per-row counterpart of the `GeometryAabb` aggregate (whole-column). Intended
for row-oriented consumers such as bulk-loading an in-memory R-tree in a
spatial-join operator, which read the resulting box column back row by row.
Computed directly over the native coordinate storage — no `geo_types` decode
and no Arrow round-trip: walk the nested `ListView` storage down to the leaf
x/y buffers, tracking which top-level row owns each coordinate, then min/max
per row. A `Rect` input is the identity; a null row or an empty geometry
yields a null box, so the output is always nullable.
Hoist the shared `f64_field` coordinate-column accessor into
`extension::coordinate`, used by both this function and the aggregate.
Signed-off-by: Nemo Yu <zyu379@wisc.edu>1 parent 2ea51cb commit 72aa947
6 files changed
Lines changed: 500 additions & 10 deletions
File tree
- vortex-geo/src
- aggregate_fn
- extension
- scalar_fn
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
217 | 216 | | |
218 | 217 | | |
219 | 218 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 219 | + | |
| 220 | + | |
228 | 221 | | |
229 | 222 | | |
230 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
192 | 209 | | |
193 | 210 | | |
194 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
0 commit comments