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

   ## Proposed changes
    Support to create partition materialized view using nodata table
   Such as the table def as following:
   >        CREATE TABLE `test_no_data` (
   >         `user_id` LARGEINT NOT NULL COMMENT '"用户id"',
   >         `date` DATE NOT NULL COMMENT '"数据灌入日期时间"',
   >         `num` SMALLINT NOT NULL COMMENT '"数量"'
   >        ) ENGINE=OLAP
   >        DUPLICATE KEY(`user_id`, `date`, `num`)
   >        COMMENT 'OLAP'
   >        PARTITION BY RANGE(`date`)
   >        (PARTITION p201701_1000 VALUES [('0000-01-01'), ('2017-02-01')),
   >        PARTITION p201702_2000 VALUES [('2017-02-01'), ('2017-03-01')),
   >        PARTITION p201703_all VALUES [('2017-03-01'), ('2017-04-01')))
   >        DISTRIBUTED BY HASH(`user_id`) BUCKETS 2
   >        PROPERTIES ('replication_num' = '1') ;
   
   when table test_no_data has no data, it also support to create partition 
materialized view as following:
   >        CREATE MATERIALIZED VIEW no_data_partition_mv
   >            BUILD IMMEDIATE REFRESH AUTO ON MANUAL
   >            partition by(`date`)
   >            DISTRIBUTED BY RANDOM BUCKETS 2
   >            PROPERTIES ('replication_num' = '1')
   >            AS
   >           SELECT * FROM test_no_data where date > '2017-05-01';
   >
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to