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 2020/06/02 09:51:26 UTC

[GitHub] [druid] taylor12805 opened a new issue #9966: Grouping Sets Behaviors Strange On Druid Using Filter conditions

taylor12805 opened a new issue #9966:
URL: https://github.com/apache/druid/issues/9966


   ### Affected Version
   0.18.1
   
   ### Description
   We run a test on wikipedia datasource to test grouping sets SQL function.
   When the SQL is like this, the result come as expected.
   `
   select
   countryName,
   cityName,
   sum(sum_deleted)
   from
   wikipedia 
   where
   "__time" between TIMESTAMP '2016-01-01 00:00:00' and TIMESTAMP '2017-05-11 00:00:00'
   group by GROUPING SETS ((countryName, cityName), (countryName), ())
   `
   However when we add some conditions in the where clause, the result doesn't show grouping set results as expected
   `
   select
   countryName,
   cityName,
   sum(sum_deleted)
   from
   wikipedia 
   where
   "__time" between TIMESTAMP '2016-01-01 00:00:00' and TIMESTAMP '2017-05-11 00:00:00'
   and countryName in ('Argentina', 'Australia', 'Belgium')
   and cityName in ('Buenos Aires', 'Canberra', 'Seventeen Mile Rocks', 'Antwerp')
   group by GROUPING SETS ((countryName, cityName), (countryName), ())
   `
   Result:
   Argentina    Buenos Aires                    238
   Australia      Canberra                           342
   Australia      Seventeen Mile Rocks  79
   Belgium       Antwerp                             66
   
   which looks like only calculate group by countryName, cityName.
   
   I run the data on Hive with conditions in the where clause and it turns out to have the right results
   Result:
   all                  all                                         725
   Argentina   all                                          238
   Argentina    Buenos Aires                    238
   Australia      all                                         421
   Australia      Canberra                           342
   Australia      Seventeen Mile Rocks  79
   Belgium       all                                         66
   Belgium       Antwerp                             66
   


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

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] taylor12805 commented on issue #9966: Grouping Sets Behaviors Strangely On Druid with Filter conditions

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


   The case only shown when the data is rollup


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

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