You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/19 17:37:51 UTC

[GitHub] [spark] Kimahriman edited a comment on pull request #32559: [SPARK-35410][SQL] SubExpr elimination should not include redundant children exprs in conditional expression

Kimahriman edited a comment on pull request #32559:
URL: https://github.com/apache/spark/pull/32559#issuecomment-844321127


   > For optionally evaluated expressions, do you mean expressions only happen in a few conditions/values? Since it is not definitely evaluated, but as a subexpression it will be evaluated all the times. I think it is hard to make sure it is always good for performance.
   
   Yeah that was the idea was for things like conditions/values that are only sometimes evaluated, evaluate them as a subexpression IF that expression is used somewhere else that's always evaluated anyway. Right now (assuming the above patch is applied), extra conditions and values that are only sometimes evaluated might not be pulled out as subexpressions even if they could be. So you would never evaluate an expression eagerly if we weren't definitely going to evaluate it at some point. I can try to make a PR to explain what I mean (and fix the bug I mentioned)
   


-- 
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:
users@infra.apache.org



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