paleolimbot opened a new issue, #206:
URL: https://github.com/apache/sedona-db/issues/206

   As part of #174, there are a few functions that are the same as WKB + 
validation:
   
   - ST_LinestringFromWKB (with alias: ST_LineFromWKB)
   - ST_PointFromWKB
   
   These are slightly different than our existing "FromWKB/Binary" because our 
existing fromwkb/binary is lazy and doesn't copy anything. We do have a 
validation loop and we can add an optional type validator:
   
   
https://github.com/apache/sedona-db/blob/95c156d507f9ce67dde1fd3ec6e1a196c70a39a6/rust/sedona-functions/src/st_geomfromwkb.rs#L111
   
   ...could be
   
   ```rust
   if let Some(expected_geometry_type_id)  = self.expected_geometry_type {
     // Create a builder
     executor.execute_wkb_void(|_maybe_item| {
       // add them item or add null to the builder for _maybe_items whose type 
id doesn't match
     })?;
     executor.finish(builder.finish())
   } else {
     executor.execute_wkb_void(|_maybe_item| Ok(()))?;
     args[0].cast_to(self.out_type.storage_type(), None)
   }
   ```
   
   The steps for adding a parameter to the Udf struct and creating the udf with 
documentation are very similar to https://github.com/apache/sedona-db/issues/205


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