Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19901#discussion_r155169169
--- 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 --
ditto, keep previous code style.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]