You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "timsaucer (via GitHub)" <gi...@apache.org> on 2026/03/27 14:03:59 UTC

[I] Improve usability of regexp and other functions [datafusion-python]

timsaucer opened a new issue, #1446:
URL: https://github.com/apache/datafusion-python/issues/1446

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   In functions like `regexp_count` we have definition like this:
   
   ```python
   def regexp_count(
       string: Expr, pattern: Expr, start: Expr | None = None, flags: Expr | None = None
   ) -> Expr:
   ```
   
   It is a common pattern that the `pattern` is a string, the `start` is an integer, and `flags` is a string (or single character).
   
   It would be more pythonic if we can just pass those values without wrapping them in a `lit()` call.
   
   **Describe the solution you'd like**
   
   Review the regexp functions in the function library and find other common patterns.
   
   For each allow users to not have to specify a Expr. We do this in other places in the code, so a pattern is already established.
   


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

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


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


Re: [I] Improve usability of regexp and other functions [datafusion-python]

Posted by "ntjohnson1 (via GitHub)" <gi...@apache.org>.
ntjohnson1 commented on issue #1446:
URL: https://github.com/apache/datafusion-python/issues/1446#issuecomment-4208072102

   I came here to post about this as well. I think a good check on this is the ability to remove `lit` from all doctest examples.
   Hit this recently around a bunch of string functions. `strpos`, `array_to_string` etc


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

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


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


Re: [I] Improve usability of regexp and other functions [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer closed issue #1446: Improve usability of regexp and other functions
URL: https://github.com/apache/datafusion-python/issues/1446


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

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


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


Re: [I] Improve usability of regexp and other functions [datafusion-python]

Posted by "renato2099 (via GitHub)" <gi...@apache.org>.
renato2099 commented on issue #1446:
URL: https://github.com/apache/datafusion-python/issues/1446#issuecomment-4238821264

   Hi @timsaucer @ntjohnson1 , I took a stab at this over in https://github.com/apache/datafusion-python/pull/1493 , if you think it is in the right direction, I can expand that to other functions. The current change is only on the python side since there is no "real" problem in the rust side as far as I see .
   Anyway, let me know what you guys think. Thanks!


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

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


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