HaoYang670 commented on issue #3615: URL: https://github.com/apache/arrow-datafusion/issues/3615#issuecomment-1276970649
Thank you, @retikulum. Your test case makes sense to me. 👍 > can't we check it with the following control !( is_zero(&left) && is_zero(&right) )? Sorry, we couldn't. Because `is_zero` only works for literals: https://github.com/apache/arrow-datafusion/blob/master/datafusion/optimizer/src/simplify_expressions.rs#L105. If `A` is `col(a)`, `is_zero(A)` will always return false. In another word, the value of `col(a)` is unknown. > You mentioned about performance concerns. Yes, there might be some performance regression, but not much. Because this is just an expression simplification for a special case. Besides, correctness should be always over the performance. -- 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]
