You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2020/02/21 05:13:00 UTC

[jira] [Commented] (SPARK-28093) Built-in function trim/ltrim/rtrim has bug when using trimStr

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

Wenchen Fan commented on SPARK-28093:
-------------------------------------

This has been reverted in https://api.github.com/repos/apache/spark/pulls/27540

> Built-in function trim/ltrim/rtrim has bug when using trimStr
> -------------------------------------------------------------
>
>                 Key: SPARK-28093
>                 URL: https://issues.apache.org/jira/browse/SPARK-28093
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.4.2, 2.4.3
>            Reporter: Yuming Wang
>            Priority: Major
>              Labels: release-notes
>             Fix For: 3.0.0
>
>
> {noformat}
> spark-sql> SELECT trim('yxTomxx', 'xyz'), trim('xxxbarxxx', 'x');
> z
> spark-sql> SELECT ltrim('zzzytest', 'xyz'), ltrim('xyxXxyLAST WORD', 'xy');
> xyz
> spark-sql> SELECT rtrim('testxxzx', 'xyz'), rtrim('TURNERyxXxy', 'xy');
> xy
> spark-sql>
> {noformat}
> {noformat}
> postgres=# SELECT trim('yxTomxx', 'xyz'), trim('xxxbarxxx', 'x');
>  btrim | btrim
> -------+-------
>  Tom   | bar
> (1 row)
> postgres=# SELECT ltrim('zzzytest', 'xyz'), ltrim('xyxXxyLAST WORD', 'xy');
>  ltrim |    ltrim
> -------+--------------
>  test  | XxyLAST WORD
> (1 row)
> postgres=# SELECT rtrim('testxxzx', 'xyz'), rtrim('TURNERyxXxy', 'xy');
>  rtrim |   rtrim
> -------+-----------
>  test  | TURNERyxX
> (1 row)
> {noformat}



--
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