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

ASF GitHub Bot reassigned SPARK-48852:
--------------------------------------

    Assignee:     (was: Apache Spark)

> String trim function returning incorrect results in Spark connect
> -----------------------------------------------------------------
>
>                 Key: SPARK-48852
>                 URL: https://issues.apache.org/jira/browse/SPARK-48852
>             Project: Spark
>          Issue Type: Bug
>          Components: Connect
>    Affects Versions: 3.5.0
>            Reporter: Biruk Tesfaye
>            Priority: Major
>              Labels: correctness, pull-request-available
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> With spark connect, the snippet: 
>  
> {code:java}
> import org.apache.spark.sql.functions.trim 
> import spark.implicits._ 
> val df = Seq((" john"), ("jane "), (" ann ")).toDF("name") 
> val trimmedDF = df.withColumn("name", trim($"name", " ")) 
> trimmedDF.collect(){code}
> returns an incorrect result
> {code:java}
> Array[Row] = Array([], [], []){code}
> We get the same result when using `{{{}rtrim{}}}` and `{{{}ltrim{}}}` as 
> well.  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to