Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/22943#discussion_r230998508
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
---
@@ -359,7 +359,7 @@ case class Cast(child: Expression, dataType: DataType,
timeZoneId: Option[String
// TimestampConverter
private[this] def castToTimestamp(from: DataType): Any => Any = from
match {
case StringType =>
- buildCast[UTF8String](_, utfs =>
DateTimeUtils.stringToTimestamp(utfs, timeZone).orNull)
+ buildCast[UTF8String](_, s =>
DateTimeUtils.stringToTimestamp(s.trim(), timeZone).orNull)
--- End diff --
Ur, I'd like not to rename it. One line function document will suffice.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]