Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19518#discussion_r150220400
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
---
@@ -801,12 +801,12 @@ case class Cast(child: Expression, dataType:
DataType, timeZoneId: Option[String
private[this] def castToByteCode(from: DataType, ctx: CodegenContext):
CastFunction = from match {
case StringType =>
val wrapper = ctx.freshName("wrapper")
- ctx.addMutableState("UTF8String.IntWrapper", wrapper,
+ val wrapperAccessor = ctx.addMutableState("UTF8String.IntWrapper",
wrapper,
--- End diff --
I'd like to have something like
```
val wrapper = ctx.addMutableState("UTF8String.IntWrapper", v => s"$v = new
UTF8String.IntWrapper();")
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]