Uh oh!
There was an error while loading. Please reload this page.
ARROW-7205 : [C++][Gandiva] Implement regexp_like in Gandiva - #8844
ARROW-7205 : [C++][Gandiva] Implement regexp_like in Gandiva#8844wjones127 wants to merge 1 commit into
Conversation
960406e to
6a0f5cbComparewjones127
commented
Jan 1, 2021
@pravindra@Praveen2112@projjal Got some time for a review? 😁 |
6a0f5cb to
a565f19Compareprojjal
commented
Mar 31, 2021
Hi @wjones127. Looks like creating a base holder class and two derived class for just these two functions seems overkill to me (I think thats why I closed the original pr temporarily). The only difference in logic between the two functions is that in case of "like" we convert the sql pattern to regex pattern before storing the compiled pattern. Would it make sense if we pass a flag to the holder that says if this is sql pattern or regex patttern? |
wjones127
commented
Mar 31, 2021
Projjal, that's a good point. The SQL like function is basically a wrapper around I will consolidate them into a single |
a565f19 to
41133b9CompareThere was a problem hiding this comment.
FYI This looks to be the first use of Arrow::Result in the Gandiva codebase, but this seems to be what the main arrow C++ codebase is using recently. Let me know if you object.
There was a problem hiding this comment.
Previously, like was using RE2::FullMatch. However, regexp_matches needs to use RE2::PartialMatch, so I've modified this method to make partial match statements. I have added a new set of tests to validate it.
I didn't see any use of this utility method outside of the like implementation, so I thought this change would be okay.
There was a problem hiding this comment.
This change enables using \ as an escape character in LIKE statements. For example, col like '\_%' can match anything starting with an underscore.
wjones127
commented
Apr 2, 2021
I think we should merge #9700 before this one, since my refactor of |
nealrichardson
commented
Jul 23, 2021
@wjones127#9700 has merged, are you planning to pick this back up? |
wjones127
commented
Jul 23, 2021
Yes, I'll work on it this weekend. |
55d96b3 to
a21742fComparewjones127
commented
Jul 25, 2021
@projjal This is now ready for review. Since we've added |
fixed linting issues fixed check style issues Fixed some names Remove extra whitespace Add substr short-ciruit for regexp_like Refactor to share logic between like and rlike Fix style issues Fix segfault Fix SqlLikePatternToPcre to use partial matching Fix style issues and warning Fix formatting; ran the docker image and used clang-format
a21742f to
7621eedCompare
Was looking for "rlike" support in Gandiva and found we had nearly implementing it. This PR revives #5860.