You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/08/03 12:53:36 UTC

[GitHub] [arrow-datafusion] alamb commented on issue #7185: Support simplifying expressions such as `~ ^(ba_r|foo)$` , where the string includes underline

alamb commented on issue #7185:
URL: https://github.com/apache/arrow-datafusion/issues/7185#issuecomment-1663931856

   `_` has special meaning in SQL regex syntax, specifically matching any single character. Thus I am not sure the rewrite you propose is correct
   
   ```
   postgres=# select 'foo' LIKE 'fo_';
    ?column?
   ----------
    t
   (1 row)
   ```
   
   ```
   str = ~  ^(id_1|id_2)$
   ```
   
   Could be rewritten to this though:
   
   ```
   str = ~  ^(id_2)$ OR str = ~  ^(id_2)$
   ```
   
   


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