cfmcgrady commented on pull request #32977:
URL: https://github.com/apache/spark/pull/32977#issuecomment-867293777


   > > I'm saying `element_at(c1, 7)` being considered a subexpression is a 
bug, are you saying that's not the case? If it's not a bug, then people will 
keep hitting weird edge case errors like this PR is trying to address. Main 
question is between `If`, `CaseWhen`, and `Coalesce`, which if any guarantee 
evaluation order (which is required for certain checks like checking the size 
of an array before accessing an element)
   > 
   > Well, I think it depends on how we evaluate case-when. Personally I prefer 
not to rely on short-circuit evaluation to guard an expression. If it is not 
defined in SQL definition, it is not reliable. For example, if we are going to 
evaluate all conditions in parallel?
   > 
   > Let's wait for more other voices. If there is consensus that we should 
follow the short-circuit evaluation, then we should remove the subexpression.
   
   kindly ping @cloud-fan @maropu 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to