You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/01/20 03:13:36 UTC

[GitHub] [incubator-doris] hwwxg opened a new issue #5266: Can a bitmap field be group by, or can be selected after related field being group by?

hwwxg opened a new issue #5266:
URL: https://github.com/apache/incubator-doris/issues/5266


   CREATE TABLE t_event (
   userid  INT,
   userid_bitmap  BITMAP BITMAP_UNION,
   event_name VARCHAR(100) REPLACE
   )
   
   select count(DISTINCT(userid)) from 
   		((select userid from t_label where label_1 > 1000) 
   			UNION (select userid from t_event where event_name = 'EnterScreen' group by userid having count() > 3)) t1
   		join ((select userid from t_label where label_2 > 1000) 
   			UNION (select userid from t_event where event_name = 'AppFirstOpen' group by userid having count() > 3)) t2 
   		on (t1.userid = t2.userid)
   
   How to optimize the performance of this statement, it seems that bitmap cannot be used. Can a bitmap field be group by, or can be selected after related field being group by? the userid_bitmap is one-on-one with userid, when group by userid, can we select userid_bitmap?
   


----------------------------------------------------------------
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@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org