kou commented on code in PR #40970:
URL: https://github.com/apache/arrow/pull/40970#discussion_r1557173151


##########
cpp/src/gandiva/regex_functions_holder.cc:
##########
@@ -118,24 +119,13 @@ Result<std::shared_ptr<LikeHolder>> 
LikeHolder::Make(const FunctionNode& node) {
         Status::Invalid(
             "'like' function requires a string literal as the third 
parameter"));
     return Make(std::get<std::string>(literal->holder()),
-                std::get<std::string>(escape_char->holder()));
+                std::get<std::string>(escape_char->holder()), regex_op);
   }
 }
 
-Result<std::shared_ptr<LikeHolder>> LikeHolder::Make(const std::string& 
sql_pattern) {
-  std::string pcre_pattern;
-  ARROW_RETURN_NOT_OK(RegexUtil::SqlLikePatternToPcre(sql_pattern, 
pcre_pattern));
-
-  auto lholder = std::shared_ptr<LikeHolder>(new LikeHolder(pcre_pattern));
-  ARROW_RETURN_IF(!lholder->regex_.ok(),
-                  Status::Invalid("Building RE2 pattern '", pcre_pattern,
-                                  "' failed with: ", lholder->regex_.error()));
-
-  return lholder;
-}

Review Comment:
   It seems that this is an exported API. If we remove this, we break backward 
compatibility. Is it expected?



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