Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19730#discussion_r150609735
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ---
    @@ -1039,13 +1039,19 @@ case class Cast(child: Expression, dataType: 
DataType, timeZoneId: Option[String
               }
             }
            """
    -    }.mkString("\n")
    +    }
    +    val fieldsEvalCodes = if (ctx.INPUT_ROW != null && ctx.currentVars == 
null) {
    --- End diff --
    
    If [`ctx.currentVars != 
null`](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala#L768),
 we need to use `mkString("\n")`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to