You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/01/13 10:42:41 UTC

[GitHub] [druid] Allenyep opened a new issue #12151: if(sum(b) = 0, 0, sum(a) / sum(b)) always return 0

Allenyep opened a new issue #12151:
URL: https://github.com/apache/druid/issues/12151


   sql:  if(sum(b) = 0, 0, sum(a) / sum(b))  as value .... group by xxx
   
   my value always return 0.0
   
   sum(b) and sum(a)  are not 0.0 
   
   need help


-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] Allenyep closed issue #12151: if(sum(b) = 0, 0, sum(a) / sum(b)) always return 0

Posted by GitBox <gi...@apache.org>.
Allenyep closed issue #12151:
URL: https://github.com/apache/druid/issues/12151


   


-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] FrankChen021 commented on issue #12151: if(sum(b) = 0, 0, sum(a) / sum(b)) always return 0

Posted by GitBox <gi...@apache.org>.
FrankChen021 commented on issue #12151:
URL: https://github.com/apache/druid/issues/12151#issuecomment-1012106009


   Does Druid support `IF` function? I'm not sure.
   But there's a new function that meets your need exactly on the master branch: https://github.com/apache/druid/pull/11904


-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] Allenyep commented on issue #12151: if(sum(b) = 0, 0, sum(a) / sum(b)) always return 0

Posted by GitBox <gi...@apache.org>.
Allenyep commented on issue #12151:
URL: https://github.com/apache/druid/issues/12151#issuecomment-1012113351


   > 
   
   when sum(b) is 0, sum(a) / sum(b) return Infinity, I want to make Infinity become "/" or 0 , so I used IF function and it dosen't work 
   
   has better method? 
   
   


-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org