projjal commented on a change in pull request #10179:
URL: https://github.com/apache/arrow/pull/10179#discussion_r623638134
##########
File path: cpp/src/gandiva/like_holder.cc
##########
@@ -81,6 +81,12 @@ Status LikeHolder::Make(const FunctionNode& node,
std::shared_ptr<LikeHolder>* h
Status::Invalid(
"'like' function requires a string literal as the second
parameter"));
+ if (node.descriptor()->name() == "ilike") {
+ RE2::Options regex_op;
+ regex_op.set_case_sensitive(false); // set case-insensitive for ilike
function.
+
+ return Make(arrow::util::get<std::string>(literal->holder()), holder,
regex_op);
Review comment:
Why create a new method for this. Modify the existing one take options
##########
File path: cpp/src/gandiva/like_holder.h
##########
@@ -48,6 +51,9 @@ class GANDIVA_EXPORT LikeHolder : public FunctionHolder {
private:
explicit LikeHolder(const std::string& pattern) : pattern_(pattern),
regex_(pattern) {}
+ explicit LikeHolder(const std::string& pattern, RE2::Options regex_op)
Review comment:
You don't need explicit here. explicit is used to prevent implicit
conversions.
--
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]