Reranko05 commented on code in PR #49879:
URL: https://github.com/apache/arrow/pull/49879#discussion_r3167747270


##########
cpp/src/gandiva/regex_util.h:
##########
@@ -27,15 +27,15 @@
 namespace gandiva {
 
 /// \brief Utility class for converting sql patterns to pcre patterns.
-class GANDIVA_EXPORT RegexUtil {
+class RegexUtil {
  public:
   // Convert an sql pattern to a pcre pattern
-  static Status SqlLikePatternToPcre(const std::string& like_pattern, char 
escape_char,
-                                     std::string& pcre_pattern);
+  static GANDIVA_EXPORT arrow::Result<std::string> SqlLikePatternToPcre(
+      const std::string& like_pattern, char escape_char);
 

Review Comment:
   Thanks for the suggestions!
   
   * Updated the test to use ASSERT_OK_AND_ASSIGN
   * Removed GANDIVA_EXPORT from the inline wrapper to avoid Windows issues
   * Clarified in the PR description that this introduces a breaking API change
   * Simplified the control flow in `regex_functions_holder.cc` by using 
ARROW_ASSIGN_OR_RAISE directly in each branch
   
   Keeping the Result-based API as suggested by @kou.
   



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

Reply via email to