Skip to content

Commit dabf66c

Browse files
docs(vortex-geo): document null-free precondition on decode helpers
flatten_coordinates and geometries read/decode row storage directly, so they require null-free input; note that callers filter null rows first. Signed-off-by: Nemo Yu <zyu379@wisc.edu>
1 parent eea991e commit dabf66c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • vortex-geo/src/extension

vortex-geo/src/extension/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ pub(crate) fn validate_geometry_operands(dtypes: &[DType]) -> VortexResult<()> {
8989

9090
/// Flatten a native geometry column into a single coordinate `Struct<x, y, ...>` containing
9191
/// every vertex of every geometry.
92+
///
93+
/// Reads the coordinate buffers directly and ignores row validity, so a null row's placeholder
94+
/// coordinates are included. Callers that must exclude nulls (e.g. the AABB stat) filter the
95+
/// column first.
9296
pub(crate) fn flatten_coordinates(
9397
array: &ArrayRef,
9498
ctx: &mut ExecutionCtx,
@@ -115,6 +119,9 @@ pub(crate) fn flatten_coordinates(
115119
}
116120

117121
/// Decode a native geometry column to `geo_types`. A non-geometry operand is an error.
122+
///
123+
/// Every row must be present: a null row has no decodable geometry (the per-type decoders reject
124+
/// it), so callers filter out null rows first.
118125
pub(crate) fn geometries(
119126
array: &ArrayRef,
120127
ctx: &mut ExecutionCtx,

0 commit comments

Comments
 (0)