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

    https://github.com/apache/spark/pull/19728#discussion_r150573152
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
 ---
    @@ -126,18 +143,41 @@ 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
    --- End diff --
    
    I am sorry that I cannot understand your suggestion.
    `argNums` is referred as `$argNums` to allocate an array.  Are you 
suggesting to allocate an array as `new UTF8String[$argNums + 1]`?


---

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

Reply via email to