james-willis commented on code in PR #1225:
URL: https://github.com/apache/sedona-db/pull/1225#discussion_r3929237755


##########
rust/sedona-functions/src/st_collect_agg.rs:
##########
@@ -205,14 +208,17 @@ impl Accumulator for CollectionAccumulator {
     }
 
     fn state(&mut self) -> Result<Vec<ScalarValue>> {
-        let geometry_types_value =
-            
serde_json::to_string(&self.unique_geometry_types.iter().collect::<Vec<_>>())
-                .map_err(|e| DataFusionError::External(Box::new(e)))?;
+        // Both columns keep the exact pre-bitset wire format: a JSON list of
+        // geometry types, and a JSON list of dimensions wrapped as
+        // (Geometry, dimensions) pairs.
+        let geometry_types_value = 
serde_json::to_string(&self.types_and_dims.geometry_types())

Review Comment:
   agreed. this really simplifies the code here. thanks



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