seawinde opened a new pull request, #40332:
URL: https://github.com/apache/doris/pull/40332

   ## Proposed changes
   
   Add  `is_used_in_rewrite` property when create mv. Default true;
   If `is_used_in_rewrite` is false which means the mv would not partion in 
query rewrite.
   Such as mv def is as following:
   ```sql
           CREATE MATERIALIZED VIEW mv1
           BUILD IMMEDIATE REFRESH AUTO ON MANUAL
           DISTRIBUTED BY RANDOM BUCKETS 2
           PROPERTIES (
           'replication_num' = '1',
           'is_used_in_rewrite' = 'false'
           )
           AS
           SELECT k1, k2, count(*) from t1 group by k1, k2;
   ```
   
   if we run query as following, this mv would not partition in the query 
rewrite:
   ```sql
   SELECT k2, count(*) from t1 group by k2;
   ```
   


-- 
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-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to