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

    https://github.com/apache/spark/pull/19811#discussion_r154012855
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ---
    @@ -168,6 +166,21 @@ class CodegenContext {
       val mutableStates: mutable.ArrayBuffer[(String, String, String)] =
         mutable.ArrayBuffer.empty[(String, String, String)]
     
    +  // An array keyed by the tuple of mutable states' types and 
initialization code, holds the
    +  // current max index of the array
    +  var mutableStateArrayIdx: mutable.Map[(String, String), Int] =
    +    mutable.Map.empty[(String, String), Int]
    +
    +  // An array keyed by the tuple of mutable states' types and 
initialization code, holds the
    +  // current name of the mutableStateArray into which state of the given 
key will be compacted
    +  var mutableStateArrayCurrentNames: mutable.Map[(String, String), String] 
=
    +    mutable.Map.empty[(String, String), String]
    +
    +  // An array keyed by the tuple of mutable states' types, array names and 
initialization code,
    +  // holds the code that will initialize the mutableStateArray when 
initialized in loops
    +  var mutableStateArrayInitCodes: mutable.ArrayBuffer[(String, String, 
String)] =
    --- End diff --
    
    This is also keyed by `(javaType, arrayName)`.


---

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

Reply via email to