Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19767#discussion_r151852231
--- 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 --
Actually I think this removed part is orthogonal to what this PR did. Even
condition, true, and false expressions are not more than threshold
individually, their combination is still more than the threshold.
This PR deals the oversize gen'd codes in deeply nested expressions, not
oversize combination of codes from the children.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]