spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] yaooqinn commented on a change in pull request #26626: [SPARK-29986][SQL] Introduce java like string trim to UTF8String
Date Thu, 21 Nov 2019 13:16:33 GMT
yaooqinn commented on a change in pull request #26626: [SPARK-29986][SQL] Introduce java like
string trim to UTF8String
URL: https://github.com/apache/spark/pull/26626#discussion_r349077448
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/postgreSQL/PostgreCastToBoolean.scala
 ##########
 @@ -42,7 +42,7 @@ case class PostgreCastToBoolean(child: Expression, timeZoneId: Option[String])
   override def castToBoolean(from: DataType): Any => Any = from match {
     case StringType =>
       buildCast[UTF8String](_, str => {
-        val s = str.trim().toLowerCase()
+        val s = str.trimAll().toLowerCase()
 
 Review comment:
   presto string trim does java like way.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message