kangkaisen commented on issue #2101: 明细表支持预聚合
URL: 
https://github.com/apache/incubator-doris/issues/2101#issuecomment-548199500
 
 
   
   
   
   
   > > > alter table sales add rollup agg_sales as
   > > > SELECT country, sex, sum(quantity), sum(price)
   > > > FROM sales
   > > > GROUP BY country, sex
   > > 
   > > 
   > > `ALTER TABLE sales ADD ROLLUP(country, sex, sum(quantity), sum(price));`
   > > 直接这样是不是简洁点?
   > 
   > I think a SQL query is better for following reasons
   > 
   > 1. it is consistent with query
   > 2. it is easy to extend, such as adding bitmap_union
   
   Maybe We can refer to this paper: 
https://courses.cs.washington.edu/courses/cse591d/01sp/opt_views.pdf  
   
   Calcite Implement this algorithm and I also Implemented this algorithm in 
Presto. But this algorithm is a litter complex and need a CBO query optimizer, 
which could be a long-term solution.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to