Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/20024#discussion_r159589454
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
---
@@ -608,6 +667,20 @@ case class Cast(child: Expression, dataType: DataType,
timeZoneId: Option[String
val tz = ctx.addReferenceObj("timeZone", timeZone)
(c, evPrim, evNull) => s"""$evPrim = UTF8String.fromString(
org.apache.spark.sql.catalyst.util.DateTimeUtils.timestampToString($c, $tz));"""
+ case ar: ArrayType =>
+ (c, evPrim, evNull) => {
+ val bufferTerm = ctx.freshName("bufferTerm")
+ val bufferClass = classOf[StringBuffer].getName
--- End diff --
Since `StringBuffer` is used in `stringExpressions` and
`regexExpressions`, I just used this along with them. But, I'll update. (BTW,
any reason to use `StringBuffer` in `stringExpressions` and `regexExpressions`?)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]