You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Omega359 (via GitHub)" <gi...@apache.org> on 2024/02/28 20:42:38 UTC

[I] Remove instr code, add instr as an alias for strpos [arrow-datafusion]

Omega359 opened a new issue, #9391:
URL: https://github.com/apache/arrow-datafusion/issues/9391

   ### Is your feature request related to a problem or challenge?
   
   strpos:
   ```
   Returns the starting position of a specified substring in a string. Positions begin at 1. If the substring does not exist in the string, the function returns 0.
   
   strpos(str, substr)
   ```
   instr:
   ```
   Returns the location where substr first appeared in str (counting from 1). If substr does not appear in str, return 0.
   
   instr(str, substr)
   ```
   
   These seem to be functionally identical but have separate implementations. There isn't a good reason why instr shouldn't just be an alias for strpos that I can see.
   
   ### Describe the solution you'd like
   
   instr function is removed and replaced with an alias to strpos. Docs and everything else updated to reflect the change.
   
   ### Describe alternatives you've considered
   
   Leave the code duplication in place.
   
   ### Additional context
   
   Noted in #9026


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] Remove instr code, add instr as an alias for strpos [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #9391: Remove instr code, add instr as an alias for strpos
URL: https://github.com/apache/arrow-datafusion/issues/9391


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] Remove instr code, add instr as an alias for strpos [arrow-datafusion]

Posted by "SteveLauC (via GitHub)" <gi...@apache.org>.
SteveLauC commented on issue #9391:
URL: https://github.com/apache/arrow-datafusion/issues/9391#issuecomment-1970036015

   take


-- 
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-unsubscribe@arrow.apache.org

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