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

    https://github.com/apache/spark/pull/19901#discussion_r155176323
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullExpressions.scala
 ---
    @@ -91,29 +91,36 @@ case class Coalesce(children: Seq[Expression]) extends 
Expression {
         val codes = ctx.splitExpressionsWithCurrentInputs(
           expressions = evals,
           funcName = "coalesce",
    -      makeSplitFunction = func =>
    -        s"""
    -           |do {
    -           |  $func
    -           |} while (false);
    -         """.stripMargin,
    -      foldFunctions = _.map { funcCall =>
    -        s"""
    -           |$funcCall;
    -           |if (!${ev.isNull}) {
    -           |  continue;
    -           |}
    -         """.stripMargin
    -      }.mkString)
    -
    +      returnType = ctx.javaType(dataType),
    +      makeSplitFunction = {
    +        func =>
    --- End diff --
    
    Ah, got it about `makeSplitFunction = func =>`. I thought about multline 
style. Sorry for my misunderstanding.


---

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

Reply via email to