You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "liukun4515 (via GitHub)" <gi...@apache.org> on 2024/05/11 03:00:47 UTC

Re: [I] short-circuited expression should be evaluated one by one [datafusion]

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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org