[
https://issues.apache.org/jira/browse/CALCITE-6180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17805010#comment-17805010
]
Evgeny Stanilovsky commented on CALCITE-6180:
---------------------------------------------
Ok i take a standard :
--- begin ---
<like predicate> uses the triadic operator LIKE ...cut.... LIKE determines
whether or not a character string
‘‘matches’’ a given ‘‘pattern’’ (*also a character string*). The characters
<percent> and <underscore>
have special meaning when they occur in the pattern. The optional third
argument is a character
string containing exactly one character, known as the ‘‘escape character’’, for
use when a <percent>,
<underscore>, or the ‘*‘escape character’’ itself* is required in the pattern
without its special meaning.
--- end ---
So i interpret the second bold part is corresponding to cases like :
{noformat}
'a_c' like 'a#_c' escape '#' -> true;
{noformat}
escape symbol just removed from like predicate and not involved into further
search pattern.
and the first bold that after removing '#' from 'Dev#\ops' it become 'Dev\ops'
and need to be matched with equal 'Dev\ops'
wdyt ?
> Append possibility to escape backslash in LIKE expression
> ---------------------------------------------------------
>
> Key: CALCITE-6180
> URL: https://issues.apache.org/jira/browse/CALCITE-6180
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.36.0
> Reporter: Evgeny Stanilovsky
> Assignee: Evgeny Stanilovsky
> Priority: Major
> Labels: pull-request-available
>
> The expression below must be processed correctly and return positive result
> {noformat}
> select 'Dev\ops' like 'Dev#\ops' escape '#';
> {noformat}
> Insted it returns :
> Invalid escape sequence exception.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)