Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19767#discussion_r152414088
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/conditionalExpressions.scala
---
@@ -64,52 +64,22 @@ case class If(predicate: Expression, trueValue:
Expression, falseValue: Expressi
val trueEval = trueValue.genCode(ctx)
val falseEval = falseValue.genCode(ctx)
- // place generated code of condition, true value and false value in
separate methods if
- // their code combined is large
- val combinedLength = condEval.code.length + trueEval.code.length +
falseEval.code.length
--- End diff --
I already explained it in
https://github.com/apache/spark/pull/19767#issuecomment-345176286
Mostly it's ok because the threshold is just an estimation, not a big deal
to make it 2 times larger. CASE WHEN may be a problem and we can evaluate it in
#18641 after this PR gets merged.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]