alamb commented on code in PR #8586:
URL: https://github.com/apache/arrow-datafusion/pull/8586#discussion_r1433186142


##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -802,7 +802,7 @@ impl<'a, S: SimplifyInfo> TreeNodeRewriter for 
Simplifier<'a, S> {
                 && !info.get_data_type(&left)?.is_floating()
                 && is_zero(&right) =>
             {
-                return 
Err(DataFusionError::ArrowError(ArrowError::DivideByZero));
+                return plan_err!("Divide by zero");

Review Comment:
   Is the idea that since the error wasn't actually generated by Arrow then we 
shouldn't return an Arrow error?
   
   In theory having a structured `ArrowError` would be more specific than a 
general PlanError with a "Divide by zero" message, but I am not sure how much 
it matters 🤷 



-- 
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]

Reply via email to