Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19811#discussion_r156878552
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
 ---
    @@ -1159,14 +1156,14 @@ case class EncodeUsingSerializer(child: Expression, 
kryo: Boolean)
         // 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, 
"serializerForEncode",
    +      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]

Reply via email to