Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21193#discussion_r186669860
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
 ---
    @@ -119,7 +121,7 @@ abstract class Expression extends TreeNode[Expression] {
     
       private def reduceCodeSize(ctx: CodegenContext, eval: ExprCode): Unit = {
         // TODO: support whole stage codegen too
    -    if (eval.code.trim.length > 1024 && ctx.INPUT_ROW != null && 
ctx.currentVars == null) {
    +    if (eval.code.toString.length > 1024 && ctx.INPUT_ROW != null && 
ctx.currentVars == null) {
    --- End diff --
    
    Can you add a method to `code` that produces the size directly?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to