Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/19865#discussion_r156889936
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
---
@@ -217,6 +217,18 @@ class CodegenContext {
splitExpressions(expressions = initCodes, funcName = "init", arguments
= Nil)
}
+ /**
+ * Return true if a given variable has been described as a global
variable
+ */
+ def isDeclaredMutableState(varName: String): Boolean = {
+ val j = varName.indexOf("[")
+ val qualifiedName = if (j < 0) varName else varName.substring(0, j)
+ mutableStates.find { s =>
--- End diff --
nit: find -> exists
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]