Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.5.0
Description
With spark connect, the snippet:
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()
returns an incorrect result
Array[Row] = Array([], [], [])
We get the same result when using `rtrim` and `ltrim` as well.