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

    https://github.com/apache/spark/pull/19811#discussion_r156968572
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ---
    @@ -138,21 +138,50 @@ class CodegenContext {
     
       /**
        * Holding expressions' mutable states like 
`MonotonicallyIncreasingID.count` as a
    -   * 3-tuple: java type, variable name, code to init it.
    -   * As an example, ("int", "count", "count = 0;") will produce code:
    +   * 2-tuple: java type, variable name.
    +   * As an example, ("int", "count") will produce code:
        * {{{
        *   private int count;
        * }}}
    -   * as a member variable, and add
    -   * {{{
    -   *   count = 0;
    -   * }}}
    -   * to the constructor.
    +   * as a member variable
        *
        * They will be kept as member variables in generated classes like 
`SpecificProjection`.
        */
    -  val mutableStates: mutable.ArrayBuffer[(String, String, String)] =
    -    mutable.ArrayBuffer.empty[(String, String, String)]
    +  val mutableStates: mutable.ArrayBuffer[(String, String)] =
    +    mutable.ArrayBuffer.empty[(String, String)]
    +
    +  // An map keyed by mutable states' types holds the status of 
mutableStateArray
    +  val mutableStateArrayMap: mutable.Map[String, MutableStateArrays] =
    +    mutable.Map.empty[String, MutableStateArrays]
    +
    +  // An array holds the code that will initialize each state
    +  val mutableStateInitCodes: mutable.ArrayBuffer[String] =
    --- End diff --
    
    Sure, I would appreciate it if you put the link to a note


---

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

Reply via email to