kou opened a new issue, #33723:
URL: https://github.com/apache/arrow/issues/33723
### Describe the enhancement requested
`re2::RE2::RE2()` may be failed. We should check the `re2::RE2::RE2()`
result with `re2::RE2::ok()`.
For example:
```diff
diff --git a/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
b/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
index d3d0ac3201..b2b9d47c02 100644
--- a/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
@@ -1681,6 +1681,10 @@ struct FindSubstringRegex {
template <typename OutValue, typename... Ignored>
OutValue Call(KernelContext*, std::string_view val, Status*) const {
+ if (!regex_match_->ok()) {
+ // TODO: Report error
+ return -1;
+ }
re2::StringPiece piece(val.data(), val.length());
re2::StringPiece match;
if (RE2::PartialMatch(piece, *regex_match_, &match)) {
```
Gandiva also doesn't check `re2::RE2::RE2()` result.
If `re2::RE2::RE2()` is failed, a program is crashed like #25633 .
### Component(s)
C++, C++ - Gandiva
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]