Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19811#discussion_r156925450
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
---
@@ -1205,14 +1203,14 @@ case class DecodeUsingSerializer[T](child:
Expression, tag: ClassTag[T], kryo: B
// try conf from env, otherwise create a new one
val env = s"${classOf[SparkEnv].getName}.get()"
val sparkConf = s"new ${classOf[SparkConf].getName}()"
- val serializerInit = s"""
- if ($env == null) {
- $serializer = ($serializerInstanceClass) new
$serializerClass($sparkConf).newInstance();
+ val serializer = ctx.addMutableState(serializerInstanceClass,
"serializerForDecode",
+ v => s"""
+ if ($env == null) {
--- End diff --
nit: use the new multiline string style
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]