Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19811#discussion_r156921749
--- 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] =
--- End diff --
`arrayCompactedMutaleStates`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]