Skip to content

Commit c015d33

Browse files
authored
revert back...
1 parent e494844 commit c015d33

File tree

1 file changed

+3
-3
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions

1 file changed

+3
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ abstract class Expression extends TreeNode[Expression] {
117117

118118
private def reduceCodeSize(ctx: CodegenContext, eval: ExprCode): Unit = {
119119
// TODO: support whole stage codegen too
120-
if (eval.code.trim.length > 400 && ctx.INPUT_ROW != null && ctx.currentVars == null) {
120+
if (eval.code.trim.length > 1024 && ctx.INPUT_ROW != null && ctx.currentVars == null) {
121121
val setIsNull = if (eval.isNull != "false" && eval.isNull != "true") {
122122
val globalIsNull = ctx.freshName("globalIsNull")
123123
ctx.addMutableState(ctx.JAVA_BOOLEAN, globalIsNull)
@@ -141,8 +141,8 @@ abstract class Expression extends TreeNode[Expression] {
141141
|}
142142
""".stripMargin)
143143

144-
eval.code = ""
145-
eval.value = s"$funcFullName(${ctx.INPUT_ROW})"
144+
eval.value = newValue
145+
eval.code = s"$javaType $newValue = $funcFullName(${ctx.INPUT_ROW});"
146146
}
147147
}
148148

0 commit comments

Comments
 (0)