[ https://issues.apache.org/jira/browse/SPARK-29784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-29784: --------------------------------- Description: 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 {code} jdbc:hive2://10.18.19.208:23040/default> SELECT trim('SL', 'SSparkSQLS'); +-----------------------+ | trim(SL, SSparkSQLS) | +-----------------------+ | | +----------------------- {code} Spark 2.4 – Correct {code} jdbc:hive2://10.18.18.214:23040/default> SELECT trim('SL', 'SSparkSQLS'); +-----------------------+--+ | trim(SSparkSQLS, SL) | +-----------------------+--+ | parkSQ | +-----------------------+--+ {code} was: 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 | +-----------------------+--+ > 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 > Attachments: image-2019-11-07-22-06-48-156.png > > > 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 > {code} > jdbc:hive2://10.18.19.208:23040/default> SELECT trim('SL', 'SSparkSQLS'); > +-----------------------+ > | trim(SL, SSparkSQLS) | > +-----------------------+ > | | > +----------------------- > {code} > Spark 2.4 – Correct > {code} > jdbc:hive2://10.18.18.214:23040/default> SELECT trim('SL', 'SSparkSQLS'); > +-----------------------+--+ > | trim(SSparkSQLS, SL) | > +-----------------------+--+ > | parkSQ | > +-----------------------+--+ > {code} > -- 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