Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20021#discussion_r157821074 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala --- @@ -930,6 +930,18 @@ class CodegenContext { // inline execution if only one block blocks.head } else { + if (Utils.isTesting) { + // Passing global variables to the split method is dangerous, as any mutating to it is + // ignored and may lead to unexpected behavior. + // We don't need to check `arrayCompactedMutableStates` here, as it results to array access --- End diff -- is there any place we would do that? `ctx.addMutableState` returns an array access code, I can't image a caller would extract the array name from it and use it as parameters...
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org