ARROW-12567: [C++][Gandiva] Implement ILIKE SQL function#10179
ARROW-12567: [C++][Gandiva] Implement ILIKE SQL function#10179jvictorhuguenin wants to merge 8 commits intoapache:masterfrom
Conversation
cpp/src/gandiva/ilike_holder.h
Outdated
There was a problem hiding this comment.
You can reuse the LikeHolder class and provide the case-sensitivity option in the make method
There was a problem hiding this comment.
Ok, I created a Make method and constructor for the ILIKE function on LikeHolder, and deleted the IlikeHolder
cpp/src/gandiva/ilike_holder.cc
Outdated
There was a problem hiding this comment.
this seems incorrect, they should be case-insensitive
There was a problem hiding this comment.
not really, the pattern has (?i)(google/re2#197) to turn case-insensitive on for the pattern.
There was a problem hiding this comment.
this matching doesn't matter..actual starts_with, ends_with, sub_str are not case-insensitive
There was a problem hiding this comment.
Here we match on the pattern for starts_with, ends_with cases, and replace with them..which won't be case-insensitive
There was a problem hiding this comment.
Ok, now both like and ilike are using the same method.
There was a problem hiding this comment.
This is not yet fixed. You are still replacing with starts_with, ends_with which are case-sensitive. You need to disable TryOptimise for ILIKE
There was a problem hiding this comment.
Done, sorry I thought first that it had no difference.
cpp/src/gandiva/like_holder.h
Outdated
There was a problem hiding this comment.
You don't need explicit here. explicit is used to prevent implicit conversions.
cpp/src/gandiva/like_holder.cc
Outdated
There was a problem hiding this comment.
Why create a new method for this. Modify the existing one take options
cpp/src/gandiva/like_holder.cc
Outdated
There was a problem hiding this comment.
You can just call holder = std::shared_ptr<LikeHolder>(new LikeHolder(pcre_pattern, regex_op));
No need for if here
|
@projjal needs a rebase |
608e08f to
f160880
Compare
Closes apache#10179 from jvictorhuguenin/feature/implement-sql-ilike and squashes the following commits: f160880 <frank400> Optimize holder constructor call 97e6e2d <frank400> Remove unnecessary Make method c2363b1 <frank400> Disable TryOptimize for ilike a484149 <frank400> Fix checkstyle on cmake file c6a8372 <frank400> Delete unnecessary holder 4be6cc6 <frank400> Fix redefined function b78085a <frank400> Fix miss include 2efd43e <frank400> Implement ilike function Authored-by: frank400 <[email protected]> Signed-off-by: Praveen <[email protected]> (cherry picked from commit 0072c67)
Closes apache#10179 from jvictorhuguenin/feature/implement-sql-ilike and squashes the following commits: f160880 <frank400> Optimize holder constructor call 97e6e2d <frank400> Remove unnecessary Make method c2363b1 <frank400> Disable TryOptimize for ilike a484149 <frank400> Fix checkstyle on cmake file c6a8372 <frank400> Delete unnecessary holder 4be6cc6 <frank400> Fix redefined function b78085a <frank400> Fix miss include 2efd43e <frank400> Implement ilike function Authored-by: frank400 <[email protected]> Signed-off-by: Praveen <[email protected]>
* ARROW-11960: [C++][Gandiva] Support escape in LIKE Add gdv_fn_like_utf8_utf8_int8 function in Gandiva to support escape char in LIKE. An escape char is stored in an int8 type which is compatible with char type in C++. Closes apache#9700 from Crystrix/arrow-11960 Authored-by: crystrix <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]> * ARROW-12567: [C++][Gandiva] Implement ILIKE SQL function Closes apache#10179 from jvictorhuguenin/feature/implement-sql-ilike and squashes the following commits: f160880 <frank400> Optimize holder constructor call 97e6e2d <frank400> Remove unnecessary Make method c2363b1 <frank400> Disable TryOptimize for ilike a484149 <frank400> Fix checkstyle on cmake file c6a8372 <frank400> Delete unnecessary holder 4be6cc6 <frank400> Fix redefined function b78085a <frank400> Fix miss include 2efd43e <frank400> Implement ilike function Authored-by: frank400 <[email protected]> Signed-off-by: Praveen <[email protected]> * ARROW-12410: [C++][Gandiva] Implement regexp_replace function on Gandiva Closes apache#10059 from rodrigojdebem/feature/implement-regexp-replace and squashes the following commits: baf2778 <rodrigojdebem> Add implementation for REGEXP_REPLACE Authored-by: rodrigojdebem <[email protected]> Signed-off-by: Praveen <[email protected]> Co-authored-by: crystrix <[email protected]> Co-authored-by: frank400 <[email protected]> Co-authored-by: rodrigojdebem <[email protected]>
No description provided.