jiayuasu opened a new pull request, #2978: URL: https://github.com/apache/sedona/pull/2978
## Did you read the Contributor Guide? - Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/) ## Is this PR related to a ticket? - Yes, and the PR name follows the format `[GH-XXX] my subject`. First of 5 slices for #2973. ## What changes were proposed in this PR? Foundation slice for the Box3D type. Lands the value class and the UDT so the rest of Phase 1 can be reviewed independently. ### What's in this PR - `Box3D` value class in `common/.../geometryObjects/Box3D.java`. Stores six doubles in PostGIS box3d order: `xmin, ymin, zmin, xmax, ymax, zmax`. Geometries whose coordinates have NaN Z fold into the `z = 0` plane on a per-coordinate basis, matching PostGIS's flat-XY-treated-as-XY[Z=0] convention. - `Box3DUDT` (struct of six non-nullable doubles) + UDT registration via `UdtRegistratorWrapper`. - Catalyst plumbing in `InferredExpression`: `Box3D` as an `InferrableType`, with the matching argument-extractor, serializer, and Spark `DataType` mapping (`Box3DUDT()`). - `implicits.toBox3D` extension method to deserialise a `Box3D` from an `InternalRow`. - `Box3DUDTSuite` covering: registration via `UdtRegistratorWrapper`, JSON schema round-trip, UDT serialize/deserialize, case-object equality with a fresh instance, and Parquet write/read. ### What's *not* in this PR Everything else from Phase 1 lands as separate slices on the same issue: | Slice | Scope | | - | - | | #2 | `ST_Box3D(geom)` + `ST_3DMakeBox(p1, p2)` | | #3 | `ST_XMin/YMin/ZMin/XMax/YMax/ZMax(box3d)` overloads + `ST_AsText(box3d)` | | #4 | `ST_3DBoxIntersects` / `ST_3DBoxContains` | | #5 | `ST_3DExtent` aggregate | ## How was this patch tested? - `Box3DUDTSuite` — 5 tests, all passing locally on Spark 3.5 / Scala 2.12. - Full compile of `spark/common` clean with the new type wired through Catalyst. ## Did this PR include necessary documentation updates? - No, the Box3D documentation lands as a follow-up PR analogous to the Box2D docs PR #2966. Per existing convention (Phase 8 of #2867), per-function SQL reference pages render English under `/zh/` via `fallback_to_default`. -- 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]
