[ https://issues.apache.org/jira/browse/SPARK-48852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon resolved SPARK-48852. ---------------------------------- Fix Version/s: 4.0.0 Resolution: Fixed Issue resolved by pull request 47277 [https://github.com/apache/spark/pull/47277] > 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 > Assignee: ASF GitHub Bot > Priority: Major > Labels: correctness, pull-request-available > Fix For: 4.0.0 > > 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