liukun4515 commented on code in PR #8833:
URL: https://github.com/apache/arrow-datafusion/pull/8833#discussion_r1452863457
##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -614,7 +613,12 @@ impl ExprIdentifierVisitor<'_> {
impl TreeNodeVisitor for ExprIdentifierVisitor<'_> {
type N = Expr;
- fn pre_visit(&mut self, _expr: &Expr) -> Result<VisitRecursion> {
+ fn pre_visit(&mut self, expr: &Expr) -> Result<VisitRecursion> {
+ // related to https://github.com/apache/arrow-datafusion/issues/8814
+ // If the expr contain volatile expression or is a case expression,
skip it.
+ if matches!(expr, Expr::Case(..)) || is_volatile_expression(expr)? {
Review Comment:
I comment in the #8874, Do we have any method for this rule to make sure
the new function/expr or other cases we can't find will not bring the same bug
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]