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 2022/11/18 12:48:01 UTC

[GitHub] [doris] chenlinzhong opened a new pull request, #14400: [feature-wip](MTMV) impl multi view table data update

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

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   impl import data to multi table materialized view table,mainly include four steps
   1、create tmp table
   2、insert data to tmp table though insert into select stmt
   3、swap tmp table with origin table
   4、update task info and wrtie log
   
   ```
   create table t_user(
        event_day DATE,
        id bigint,
        username varchar(20)
   )
   DISTRIBUTED BY HASH(id) BUCKETS 10 
   PROPERTIES (
      "replication_num" = "1"
    );
   insert into  t_user values("2022-10-26",1,"clz");
   insert into  t_user values("2022-10-28",2,"zhangsang");
   insert into  t_user values("2022-10-29",3,"lisi");
   create table t_user_pv(
       event_day DATE,
       id bigint,
       pv bigint
   )
   DISTRIBUTED BY HASH(id) BUCKETS 10 
   PROPERTIES (
      "replication_num" = "1"
    );
   insert into  t_user_pv  values("2022-10-26",1,200);
   insert into  t_user_pv  values("2022-10-28",2,200);
   insert into  t_user_pv  values("2022-10-28",3,300);
   ```
   ### create multi view table 
   ```
   DROP MATERIALIZED VIEW  if exists multi_mv;
   CREATE MATERIALIZED VIEW  multi_mv
   BUILD IMMEDIATE 
   REFRESH COMPLETE 
   start with "2022-10-27 19:35:00"
   next  60 second
   KEY(username)   
   DISTRIBUTED BY HASH (username)  buckets 1
   PROPERTIES ('replication_num' = '1') 
   AS 
   select t_user.username, t_user_pv.pv  from t_user, t_user_pv where t_user.id=t_user_pv.id;
   ```
   <img width="892" alt="image" src="https://user-images.githubusercontent.com/11487604/202708285-baaa082e-62ef-4ff4-9a34-04a3f36e16be.png">
   <img width="360" alt="image" src="https://user-images.githubusercontent.com/11487604/202708355-f0df8e70-df86-462e-ab37-cb6d91b35951.png">
   
   
   
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [ ] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) 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: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] morningman commented on a diff in pull request #14400: [feature-wip](MTMV) impl multi view table data update

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #14400:
URL: https://github.com/apache/doris/pull/14400#discussion_r1027305180


##########
fe/fe-core/src/main/java/org/apache/doris/common/Config.java:
##########
@@ -30,75 +30,81 @@ public class Config extends ConfigBase {
     /**
      * The max size of one sys log and audit log
      */
-    @ConfField public static int log_roll_size_mb = 1024; // 1 GB

Review Comment:
   better not do `reformat` thing in this kind of PR?



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

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


[GitHub] [doris] chenlinzhong closed pull request #14400: [feature-wip](MTMV) impl multi view table data update

Posted by GitBox <gi...@apache.org>.
chenlinzhong closed pull request #14400: [feature-wip](MTMV) impl multi view table data update 
URL: https://github.com/apache/doris/pull/14400


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

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


[GitHub] [doris] hello-stephen commented on pull request #14400: [feature-wip](MTMV) impl multi view table data update

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #14400:
URL: https://github.com/apache/doris/pull/14400#issuecomment-1322164257

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.57 seconds
    load time: 440 seconds
    storage size: 17152141871 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221121144259_clickbench_pr_50086.html


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

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