haohuaijin commented on issue #8909: URL: https://github.com/apache/arrow-datafusion/issues/8909#issuecomment-1901859848
It looks like related to the `simplify_expressions` rule because the `simplify_expressions` rule does the [`ConstEvaluator`](https://github.com/apache/arrow-datafusion/blob/ae0f401d89cf9dc8b717e6b95f73ed4f3be9798b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs#L232), the `42/0` evaluated, result in Divide by zero error. This is a similar problem to what #8814 describes. maybe we also should not do `ConstEvaluator` for short-circuited operators. I also do some test in datafusion-cli v34 ``` DataFusion CLI v34.0.0 ❯ SELECT CASE 1 WHEN 2 THEN 42/0 END; Optimizer rule 'simplify_expressions' failed caused by Arrow error: Divide by zero error ❯ select 4/0; Optimizer rule 'simplify_expressions' failed caused by Arrow error: Divide by zero error ❯ select 1 > 4 and 5/0 > 2; Optimizer rule 'simplify_expressions' failed caused by Arrow error: Divide by zero error ``` -- 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]
