morningman commented on pull request #7550:
URL: https://github.com/apache/incubator-doris/pull/7550#issuecomment-1008256309


   Hi @GoGoWen , I tested in mysql:
   ```
   mysql> select * from tbl1;
   +-------+
   | k1    |
   +-------+
   | 58262 |
   +-------+
   1 row in set (0.06 sec)
   
   mysql> select sum(k1) from tbl1 where k1=2;
   +---------+
   | sum(k1) |
   +---------+
   |    NULL |
   +---------+
   1 row in set (0.07 sec)
   ```
   
   Looks like if the result set is empty, the `sum` will return `null`.


-- 
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-unsubscr...@doris.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to