You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dylan He (Jira)" <ji...@apache.org> on 2024/08/20 02:10:00 UTC

[jira] [Created] (FLINK-36100) Support ESCAPE in built-in function LIKE formally

Dylan He created FLINK-36100:
--------------------------------

             Summary: Support ESCAPE in built-in function LIKE formally
                 Key: FLINK-36100
                 URL: https://issues.apache.org/jira/browse/FLINK-36100
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Planner
            Reporter: Dylan He


Flink does not formally support ESCAPE in built-in function LIKE, but in some cases we do need it because '_' and '%' are interpreted as special wildcard characters, preventing their use in their literal sense.

And currently, if we forcefully use ESCAPE characters, we will get unexpected results like the cases below.
{code:java}
testSqlApi("'TE_ST' LIKE '%E\\_S%'", "TRUE"); // get FALSE
testSqlApi("'TE_ST' LIKE '%E\\_S%' ESCAPE '\\'", "TRUE"); // get FALSE
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)