Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/15807
  
    E.g.,
    
        if (isNull(subexpr)) {
          ...
        } else {
          AssertNotNull(subexpr)  // subexpr2, first used.
          ....
          SomeExpr(AssertNotNull(subexpr)) // SomeExpr(subexpr2)
        }
        
        if (isNull(subexpr)) {
          ...
        } else {
          AssertNotNull(subexpr)  // subexpr2
          ....
          SomeExpr2(AssertNotNull(subexpr)) // SomeExpr2(subexpr2)
        }   
        
        SomeExpr3(AssertNotNull(subexpr)) // SomeExpr3(subexpr2)
    
    `AssertNotNull(subexpr)` is recognized as subexpression. When it is used in 
the else branch at the top, it is evaluated in this branch. But 
`SomeExpr3(AssertNotNull(subexpr))` which also uses it can't access the 
evaluated subexpression result.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to