projjal commented on a change in pull request #10059: URL: https://github.com/apache/arrow/pull/10059#discussion_r617624562
########## File path: cpp/src/gandiva/replace_holder.cc ########## @@ -0,0 +1,100 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "gandiva/replace_holder.h" + +#include <regex> +#include "gandiva/node.h" +#include "gandiva/regex_util.h" + +namespace gandiva { + +RE2 LikeHolder::starts_with_regex_(R"((\w|\s)*\.\*)"); Review comment: Looks like you just copy pasted like_function_holder code. This two functions do different things! ########## File path: cpp/src/gandiva/precompiled/string_ops.cc ########## @@ -131,6 +133,16 @@ bool is_substr_utf8_utf8(const char* data, int32_t data_len, const char* substr, return false; } +FORCE_INLINE +const char* regexp_replace(const char* regexp, const char* str, const char* replace_string) { + std::string s = str; + std::regex r (regexp); Review comment: I meant for to not use this function and use a function holder instead. Looks like you just added a holder and not using that and instead still calling this function -- 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. For queries about this service, please contact Infrastructure at: [email protected]
