jiayuasu opened a new pull request, #3040:
URL: https://github.com/apache/sedona/pull/3040

   ## Did you read the Contributor Guide?
   
   - [x] Yes
   
   ## Is this PR related to a ticket?
   
   - [x] Yes — closes [#3039](https://github.com/apache/sedona/issues/3039); 
follow-up to the Box3D EPIC 
([#2973](https://github.com/apache/sedona/issues/2973)) and the Flink 
foundation slice #3037.
   
   ## What changes were proposed in this PR?
   
   Second Flink Box3D slice. With `Box3DTypeSerializer` + `ST_Box3D` / 
`ST_3DMakeBox` already merged in #3037, this adds the accessor surface, the 
text form, and the aggregate — mirroring the Box2D Flink functions.
   
   - **Accessors**: Box3D `eval` overloads on `ST_XMin` / `ST_YMin` / `ST_ZMin` 
/ `ST_XMax` / `ST_YMax` / `ST_ZMax`. `ST_ZMin` / `ST_ZMax` previously had only 
the Geometry overload.
   - **Text**: `ST_AsText(box3d)` → `box3dAsText` (PostGIS-style `BOX3D(...)`).
   - **Aggregate**: `Aggregators.ST_3DExtent` — `AggregateFunction<Box3D, 
Envelope3D>` mirroring `ST_Extent`. Per-row folding via `Functions.box3D` 
(missing Z → 0, empty → skipped); returns null on an all-empty/null input. New 
`Accumulators.Envelope3D` six-double accumulator. Registered in `Catalog`.
   
   **`ST_Expand` is intentionally not given a Box3D overload** — the common 
layer has no `expand(Box3D, ...)`, and the Spark Box3D surface doesn't expose 
it either.
   
   ## How was this patch tested?
   
   - `FunctionTest.testBox3DAsTextAndAccessors` — `BOX3D` text + all six 
accessors over a Box3D. Full `FunctionTest`: 205 pass.
   - `AggregatorTest.test3DExtent` (mixed XYZ / XY-fold-to-0 rows) and 
`test3DExtent_EmptyAndNullGeometries` (all-empty/null → NULL). Full 
`AggregatorTest` + `Box3DTypeSerializerTest`: 20 pass.
   
   ## Did this PR include necessary documentation updates?
   
   - [x] No — Box3D documentation is tracked separately under the Box3D EPIC.
   
   ## Out of scope (final Flink slice)
   
   - Box3D overloads on `ST_Intersects` / `ST_Contains`; `ST_3DDWithin`.


-- 
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]

Reply via email to