spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgaido91 <...@git.apache.org>
Subject [GitHub] spark pull request #19728: [SPARK-22498][SQL] Fix 64KB JVM bytecode limit pr...
Date Mon, 13 Nov 2017 11:51:53 GMT
Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19728#discussion_r150516641
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
---
    @@ -126,18 +139,36 @@ case class ConcatWs(children: Seq[Expression])
           // All children are strings. In that case we can construct a fixed size array.
           val evals = children.map(_.genCode(ctx))
     
    -      val inputs = evals.map { eval =>
    -        s"${eval.isNull} ? (UTF8String) null : ${eval.value}"
    -      }.mkString(", ")
    -
    -      ev.copy(evals.map(_.code).mkString("\n") + s"""
    -        UTF8String ${ev.value} = UTF8String.concatWs($inputs);
    +      val argNums = evals.length
    +      val args = ctx.freshName("argLen")
    +      ctx.addMutableState("UTF8String[]", args, "")
    --- End diff --
    
    this also can be kept method local, IMHO


---

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


Mime
View raw message