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

Yuming Wang commented on SPARK-29784:
-------------------------------------

Thank you [~pavithraramachandran].  We changed our non-standard syntax of trim 
function in https://github.com/apache/spark/pull/24902 from {{TRIM(trimStr, 
str)}} to {{TRIM(str, trimStr)}} to be compatible with other databases.


> Built in function trim is not compatible in 3.0 with previous version
> ---------------------------------------------------------------------
>
>                 Key: SPARK-29784
>                 URL: https://issues.apache.org/jira/browse/SPARK-29784
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: ABHISHEK KUMAR GUPTA
>            Priority: Major
>
> SELECT trim('SL', 'SSparkSQLS'); returns empty in Spark 3.0 where as in 2.4 
> and 2.3.2 is returning after leading and trailing character removed.
> Spark 3.0 – Not correct
> jdbc:hive2://10.18.19.208:23040/default> SELECT trim('SL', 'SSparkSQLS');
> +-----------------------+
> | trim(SL, SSparkSQLS) |
> +-----------------------+
> | |
> +-----------------------
> Spark 2.4 – Correct
> jdbc:hive2://10.18.18.214:23040/default> SELECT trim('SL', 'SSparkSQLS');
> +-----------------------+--+
> | trim(SSparkSQLS, SL) |
> +-----------------------+--+
> | parkSQ |
> +-----------------------+--+
>  



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