New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-18235: [C++][Gandiva] Fix the like function implementation for escape chars #14579
Conversation
|
f821f35
to
95e4075
Compare
|
||
auto literal_escape_pattern = | ||
TreeExprBuilder::MakeStringLiteral("%tu^_security^_freeze%"); | ||
auto escape_char = TreeExprBuilder::MakeStringLiteral("^"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a PCRE special character that is invalid without suitable escap such as [
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The escape char used here ('^') is one of the pcre spacial characters.
d42b1f5
to
28b686d
Compare
…ters The current implementation of optimisation for like function does a removal of the escape char, this causes errors in matching if the escape char is one of the pcre special chars or if the escape char is followed by itself. Fix this by only removing the '\\' escape char during optimisation.
e27c781
to
31973ae
Compare
Benchmark runs are scheduled for baseline = 5f8cc74 and contender = e0e7ba8. e0e7ba8 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
['Python', 'R'] benchmarks have high level of regressions. |
…escape chars (apache#14579) The current implementation of optimisation for like function does a removal of the escape char, this causes errors in matching if the escape char is one of the pcre special chars or if the escape char is followed by itself. Fix this by only removing the '\\' escape char during optimisation. Authored-by: Siddhant Rao <siddhant.rao@dremio.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
…escape chars (apache#14579) The current implementation of optimisation for like function does a removal of the escape char, this causes errors in matching if the escape char is one of the pcre special chars or if the escape char is followed by itself. Fix this by only removing the '\\' escape char during optimisation. Authored-by: Siddhant Rao <siddhant.rao@dremio.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
…escape chars (apache#14579) The current implementation of optimisation for like function does a removal of the escape char, this causes errors in matching if the escape char is one of the pcre special chars or if the escape char is followed by itself. Fix this by only removing the '\\' escape char during optimisation. Authored-by: Siddhant Rao <siddhant.rao@dremio.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
The current implementation of optimisation for like function does a
removal of the escape char, this causes errors in matching if the escape
char is one of the pcre special chars or if the escape char is followed
by itself.
Fix this by only removing the '\' escape char during optimisation.