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

    https://github.com/apache/spark/pull/20021#discussion_r157822361
  
    --- 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 --
    
    I don't think so, but currently there is also no place which creates the 
problem for which this assertion is being introduces. Of course this case is 
very very unlikely, but since we are introducing the check, I think that the 
effort to ensure also this very remote corner case is very low...


---

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

Reply via email to