You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "mschwedeler (via GitHub)" <gi...@apache.org> on 2023/10/09 12:44:38 UTC
[I] Function match_substring_regex has unexpected behavior [arrow]
mschwedeler opened a new issue, #38150:
URL: https://github.com/apache/arrow/issues/38150
### Describe the bug, including details regarding any error messages, version, and platform.
System details:
```
pyarrow: 13.0.0
platform: macOS-12.6.9-arm64-arm-64bit
python: 3.9.13
```
This is as expected:
```python
import re
print(re.findall(r'\bm\b', 'méxico'))
# []
```
This is unexpected:
```python
import pyarrow as pa
print(
pa.compute.match_substring_regex(
pa.array(
[
"méxico",
]
), pattern=r'\bm\b'
)
# <pyarrow.lib.BooleanArray object at 0x4585c27c0>
# [
# true
# ]
```
### Component(s)
Python
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] Function match_substring_regex has unexpected behavior [arrow]
Posted by "llama90 (via GitHub)" <gi...@apache.org>.
llama90 commented on issue #38150:
URL: https://github.com/apache/arrow/issues/38150#issuecomment-1753191560
It seems like the issue may be due to the character 'é'. Is it necessary to use the character 'é'? When tested on sites like https://regexr.com/, the same results appear.
méxico - true
mexico - false
--
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] [Python] Function match_substring_regex has unexpected behavior [arrow]
Posted by "spenczar (via GitHub)" <gi...@apache.org>.
spenczar commented on issue #38150:
URL: https://github.com/apache/arrow/issues/38150#issuecomment-1753296865
`\b` is the "ASCII word boundary" expression in RE2. `méxico` is not an ASCII string, it's Unicode, and `m` is indeed a complete ASCII subsequence in there.
https://github.com/google/re2/issues/433 suggests a workaround.
--
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] [Python] Function match_substring_regex has unexpected behavior [arrow]
Posted by "mschwedeler (via GitHub)" <gi...@apache.org>.
mschwedeler commented on issue #38150:
URL: https://github.com/apache/arrow/issues/38150#issuecomment-1753420278
Great, thanks both, that clarifies.
--
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] [Python] Function match_substring_regex has unexpected behavior [arrow]
Posted by "mschwedeler (via GitHub)" <gi...@apache.org>.
mschwedeler closed issue #38150: [Python] Function match_substring_regex has unexpected behavior
URL: https://github.com/apache/arrow/issues/38150
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org