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 2020/11/25 03:09:44 UTC

[GitHub] [incubator-doris] liuzhizu opened a new issue #4948: the unique key table can't provide materialized view aggregate feature

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


   the unique key table has unique feature , we need mv to aggregate such as bitmap_union(to_bitmap(user_id)),but it's wrong
   
   example:
   
   CREATE TABLE t
   (
   event_day DATE,
   user_id INT ,
   event_name VARCHAR(100),
   access_timestamp BIGINT
   )
   UNIQUE KEY(event_day,user_id, event_name,access_timestamp)
   PARTITION BY RANGE(event_day) ()
   DISTRIBUTED BY HASH(user_id)
   PROPERTIES
   (
   "dynamic_partition.enable" = "true",
   "dynamic_partition.time_unit" = "DAY",
   "dynamic_partition.end" = "3",
   "dynamic_partition.prefix" = "p",
   "dynamic_partition.buckets" = "8",
   "storage_type"="column"
   );
   
   create materialized view mv as
   select event_day,bitmap_union(to_bitmap(user_id)) from t group by event_day ;


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