You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/01/27 19:20:00 UTC

[jira] [Resolved] (SPARK-30625) Add `escapeChar` parameter to the `like` function

     [ https://issues.apache.org/jira/browse/SPARK-30625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun resolved SPARK-30625.
-----------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 27355
[https://github.com/apache/spark/pull/27355]

> Add `escapeChar` parameter to the `like` function
> -------------------------------------------------
>
>                 Key: SPARK-30625
>                 URL: https://issues.apache.org/jira/browse/SPARK-30625
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Maxim Gekk
>            Assignee: Maxim Gekk
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> SPARK-28083 supported LIKE ... ESCAPE syntax
> {code:sql}
> spark-sql> SELECT '_Apache Spark_' like '__%Spark__' escape '_';
> true
> {code}
> but the `like` function can accept only 2 parameters. If we pass the third one, it fails with:
> {code:sql}
> spark-sql> SELECT like('_Apache Spark_', '__%Spark__', '_');
> Error in query: Invalid number of arguments for function like. Expected: 2; Found: 3; line 1 pos 7
> {code}
> The ticket aims to support the third parameter in `like` as `escapeChar`.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org