You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "albertojarabo (via GitHub)" <gi...@apache.org> on 2023/02/02 11:59:32 UTC

[GitHub] [druid] albertojarabo opened a new issue, #13743: Problem with SELECT COUNT(DISTINCT __FIELD__))

albertojarabo opened a new issue, #13743:
URL: https://github.com/apache/druid/issues/13743

   I wonder why Apache Druid generates different results when executing two queries that apparently should return the same results. The queries have been executed with the same data in the table involved:
   
   Query 1: 
   <img width="311" alt="select_distinct_1_druid" src="https://user-images.githubusercontent.com/7034464/216316988-b2a23e75-dc7e-49d4-8e91-7d012164ac62.PNG">
   
   
   Query 2:
   <img width="345" alt="select_distinct_2_druid" src="https://user-images.githubusercontent.com/7034464/216317044-be399b4a-3a7b-40f2-b0b2-ee8b8418adb3.PNG">
   
   On HIVE tables with the same data, the result obtained with both queries is the same as Query 2 in Druid. I suspect that there is some problem when executing the query with COUNT(DISTINCT __FIELD__))


-- 
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.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] abhishekagarwal87 commented on issue #13743: Problem with SELECT COUNT(DISTINCT __FIELD__))

Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 commented on issue #13743:
URL: https://github.com/apache/druid/issues/13743#issuecomment-1413821165

   Its because one query is using approximate distinct count while the second one is using exact distinct count. You can disable approximate in the query context (click on "..." next to Engine)


-- 
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] abhishekagarwal87 closed issue #13743: Problem with SELECT COUNT(DISTINCT __FIELD__))

Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 closed issue #13743: Problem with SELECT COUNT(DISTINCT __FIELD__))
URL: https://github.com/apache/druid/issues/13743


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