Kontinuation commented on code in PR #615:
URL: https://github.com/apache/sedona-db/pull/615#discussion_r2891134477


##########
rust/sedona-raster-functions/src/executor.rs:
##########
@@ -35,6 +40,177 @@ pub struct RasterExecutor<'a, 'b> {
     num_iterations: usize,
 }
 
+#[derive(Clone)]
+enum ItemWkbAccessor {
+    Binary(BinaryArray),
+    BinaryView(BinaryViewArray),
+}
+
+impl ItemWkbAccessor {
+    #[inline]
+    fn get(&self, i: usize) -> Option<&[u8]> {

Review Comment:
   I have thought about eliminating this dynamic dispatching when implementing 
it, and I deliberately leave it that way. Here are the reasons:
   
   1. `Box<dyn Iterator<Item = ...>>` performs dynamic dispatching implicitly, 
I'm not sure if it is better than pattern-matching a enum.
   2. RS functions involving a raster and a geometry input are usually heavy 
weight, the cost of dispatching does not add up too much overhead.



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