Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/18641#discussion_r150786689
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/conditionalExpressions.scala
---
@@ -262,37 +262,91 @@ case class CaseWhenCodegen(
// }
// }
// }
+
+ val isNull = ctx.freshName("caseWhenIsNull")
+ val value = ctx.freshName("caseWhenValue")
+
val cases = branches.map { case (condExpr, valueExpr) =>
--- End diff --
Can we follow what we did for `And` and `Or`, and just check the code
length at the beginning? TBH I don't understand your change after several
minutes reading.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]