You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2017/12/12 00:42:29 UTC

[GitHub] spark pull request #19865: [SPARK-22668][SQL] Ensure no global variables in ...

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

    https://github.com/apache/spark/pull/19865#discussion_r156243726
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala ---
    @@ -842,7 +856,10 @@ class CodegenContext {
           blocks.head
         } else {
           val func = freshName(funcName)
    -      val argString = arguments.map { case (t, name) => s"$t $name" }.mkString(", ")
    +      val argString = arguments.map { case (t, name) =>
    +        assert(!isDeclaredMutableState(name),
    --- End diff --
    
    I'm neutral about this pr though, I feel this is not the best place for this assertion cuz this is not only the place where the suggested case happens, e.g., my pr splits aggregate functions in `HashAggregate`


---

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