apache / apache/arrow

[C++][Python] replace_substring_regex hangs indefinitely for negative max_replacements

Open
#39,149 4 comments 0 reactions 1 assignee Claimed by @mason142 View on GitHub
Component: C++ Component: Python good-first-issue Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

`pa.compute.replace_substring_regex("abc", "", "", max_replacements=-3)`

This call hangs indefinitely

```
>>> pa.__version__
'14.0.0'
```

### Component(s)

C++, Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.