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

   I recall hitting something like this with the substr/substring function. One 
would think they would be identical however they were not (since rust doesn't 
do variadic functions nor does it allow defaults for args ala scala or Kotlin). 
For the substr it was expanded to two functions that internally used a vec<> 
and handled the logic of using the optional 3rd argument there.
   
   ```
       #[doc = "substring from the `position` to the end"]
       pub fn substr(string: Expr, position: Expr) -> Expr {
           super::substr().call(vec![string, position])
       }
   
       #[doc = "substring from the `position` with `length` characters"]
       pub fn substring(string: Expr, position: Expr, length: Expr) -> Expr {
           super::substr().call(vec![string, position, length])
       }
       ```


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