andygrove commented on issue #10424:
URL: https://github.com/apache/datafusion/issues/10424#issuecomment-2105220455

   I am +1 for this solution suggested by @Michael-J-Ward 
   
   ```rust
   #[doc = "returns a slice of the array."]
   pub fn array_slice(array: Expr, begin: Expr, end: Expr, stride: 
Option<Expr>) -> Expr {
       if let Some(stride) = stride {
           Expr::ScalarFunction(ScalarFunction::new_udf(
               array_slice_udf(),
               vec![array, begin, end, stride],
           ))
       } else {
           Expr::ScalarFunction(ScalarFunction::new_udf(
               array_slice_udf(),
               vec![array, begin, end],
           ))
       }
   }
   ```


-- 
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: github-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to