You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2025/10/10 15:23:12 UTC

[I] rust/sedona-functions: Add `ST_xxxFromWKB()` functions [sedona-db]

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: issues-unsubscribe@sedona.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] rust/sedona-functions: Add `ST_xxxFromWKB()` functions [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #206: rust/sedona-functions: Add `ST_xxxFromWKB()` functions
URL: https://github.com/apache/sedona-db/issues/206


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org