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 2021/11/04 15:57:19 UTC

[GitHub] [druid] JRobTS edited a comment on issue #11603: Druid SQL: Query with Count(*) is not returning actual number of rows with HAVING clause on derived columns

JRobTS edited a comment on issue #11603:
URL: https://github.com/apache/druid/issues/11603#issuecomment-961180338


   I also see inconsistent results with CAST but without the subquery. This happens on the most recently ingested data (e.g. data ingested in the past 10 minutes)
   
   ```
   SELECT COUNT(*)
           FROM "datasource"
           WHERE __time >= '2021-10-27T14:00:00+00:00'
           AND __time < '2021-10-27T15:00:00+00:00' 
           AND EventName = 'Completed' 
   ```
   --> 18640
   
   ```
   SELECT COALESCE(ReturnDate, 0)
           FROM "datasource"
           WHERE __time >= '2021-10-27T14:00:00+00:00'
           AND __time < '2021-10-27T15:00:00+00:00' 
           AND EventName = 'Completed' 
   ```
   --> 18640
   
   ```
   SELECT CAST(ReturnDate AS INTEGER)
           FROM "datasource"
           WHERE __time >= '2021-10-27T14:00:00+00:00'
           AND __time < '2021-10-27T15:00:00+00:00' 
           AND EventName = 'Completed' 
   ```
   --> 13375
   
   


-- 
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