[ 
https://issues.apache.org/jira/browse/SPARK-30625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17022398#comment-17022398
 ] 

Maxim Gekk commented on SPARK-30625:
------------------------------------

I have implemented the feature but I am not sure it isĀ useful. Should I submit 
a PR for that, WDYT [~dongjoon] [~Gengliang.Wang] [~cloud_fan] [~beliefer] 
[~maropu] [~hyukjin.kwon] ?

> 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
>            Priority: Minor
>
> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to