liukun4515 commented on issue #8927:
URL: https://github.com/apache/datafusion/issues/8927#issuecomment-2105501373
I also find some very special cases when I meet the error.
This is example sql:
```
SELECT
(
case
when SUM(col1) != 0 then SUM(col1) / SUM(col2)
else 0
end
) as metric
FROM
table
having
(
metric > 0
)
```
This a case when case, but the filter `metric > 0` will changed to `and`
filter in the `simplify_expressions` optimization rule
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]