This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 87e64115ae [Chore](materialized-view) add case about insert data imidiately after create mv(#21281) 87e64115ae is described below commit 87e64115aedf4e5eac5685b4f979f4d3e5a3686c Author: Pxl <pxl...@qq.com> AuthorDate: Thu Jun 29 11:17:38 2023 +0800 [Chore](materialized-view) add case about insert data imidiately after create mv(#21281) add case about insert data imidiately after create mv --- regression-test/data/mv_p0/no_await/no_await.out | 511 +++++++++++++++++++++ .../suites/mv_p0/no_await/no_await.groovy | 142 ++++++ 2 files changed, 653 insertions(+) diff --git a/regression-test/data/mv_p0/no_await/no_await.out b/regression-test/data/mv_p0/no_await/no_await.out new file mode 100644 index 0000000000..14c441abcd --- /dev/null +++ b/regression-test/data/mv_p0/no_await/no_await.out @@ -0,0 +1,511 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !mv -- +49994996 + +-- !mv -- +49994992 + +-- !mv -- +49994988 + +-- !mv -- +49994984 + +-- !mv -- +49994980 + +-- !mv -- +49994976 + +-- !mv -- +49994972 + +-- !mv -- +49994968 + +-- !mv -- +49994964 + +-- !mv -- +49994960 + +-- !mv -- +49994956 + +-- !mv -- +49994952 + +-- !mv -- +49994948 + +-- !mv -- +49994944 + +-- !mv -- +49994940 + +-- !mv -- +49994936 + +-- !mv -- +49994932 + +-- !mv -- +49994928 + +-- !mv -- +49994924 + +-- !mv -- +49994920 + +-- !mv -- +49994916 + +-- !mv -- +49994912 + +-- !mv -- +49994908 + +-- !mv -- +49994904 + +-- !mv -- +49994900 + +-- !mv -- +49994896 + +-- !mv -- +49994892 + +-- !mv -- +49994888 + +-- !mv -- +49994884 + +-- !mv -- +49994880 + +-- !mv -- +49994876 + +-- !mv -- +49994872 + +-- !mv -- +49994868 + +-- !mv -- +49994864 + +-- !mv -- +49994860 + +-- !mv -- +49994856 + +-- !mv -- +49994852 + +-- !mv -- +49994848 + +-- !mv -- +49994844 + +-- !mv -- +49994840 + +-- !mv -- +49994836 + +-- !mv -- +49994832 + +-- !mv -- +49994828 + +-- !mv -- +49994824 + +-- !mv -- +49994820 + +-- !mv -- +49994816 + +-- !mv -- +49994812 + +-- !mv -- +49994808 + +-- !mv -- +49994804 + +-- !mv -- +49994800 + +-- !mv -- +49994796 + +-- !mv -- +49994792 + +-- !mv -- +49994788 + +-- !mv -- +49994784 + +-- !mv -- +49994780 + +-- !mv -- +49994776 + +-- !mv -- +49994772 + +-- !mv -- +49994768 + +-- !mv -- +49994764 + +-- !mv -- +49994760 + +-- !mv -- +49994756 + +-- !mv -- +49994752 + +-- !mv -- +49994748 + +-- !mv -- +49994744 + +-- !mv -- +49994740 + +-- !mv -- +49994736 + +-- !mv -- +49994732 + +-- !mv -- +49994728 + +-- !mv -- +49994724 + +-- !mv -- +49994720 + +-- !mv -- +49994716 + +-- !mv -- +49994712 + +-- !mv -- +49994708 + +-- !mv -- +49994704 + +-- !mv -- +49994700 + +-- !mv -- +49994696 + +-- !mv -- +49994692 + +-- !mv -- +49994688 + +-- !mv -- +49994684 + +-- !mv -- +49994680 + +-- !mv -- +49994676 + +-- !mv -- +49994672 + +-- !mv -- +49994668 + +-- !mv -- +49994664 + +-- !mv -- +49994660 + +-- !mv -- +49994656 + +-- !mv -- +49994652 + +-- !mv -- +49994648 + +-- !mv -- +49994644 + +-- !mv -- +49994640 + +-- !mv -- +49994636 + +-- !mv -- +49994632 + +-- !mv -- +49994628 + +-- !mv -- +49994624 + +-- !mv -- +49994620 + +-- !mv -- +49994616 + +-- !mv -- +49994612 + +-- !mv -- +49994608 + +-- !mv -- +49994604 + +-- !mv -- +49994600 + +-- !mv -- +49994596 + +-- !mv -- +49994592 + +-- !mv -- +49994588 + +-- !mv -- +49994584 + +-- !mv -- +49994580 + +-- !mv -- +49994576 + +-- !mv -- +49994572 + +-- !mv -- +49994568 + +-- !mv -- +49994564 + +-- !mv -- +49994560 + +-- !mv -- +49994556 + +-- !mv -- +49994552 + +-- !mv -- +49994548 + +-- !mv -- +49994544 + +-- !mv -- +49994540 + +-- !mv -- +49994536 + +-- !mv -- +49994532 + +-- !mv -- +49994528 + +-- !mv -- +49994524 + +-- !mv -- +49994520 + +-- !mv -- +49994516 + +-- !mv -- +49994512 + +-- !mv -- +49994508 + +-- !mv -- +49994504 + +-- !mv -- +49994500 + +-- !mv -- +49994496 + +-- !mv -- +49994492 + +-- !mv -- +49994488 + +-- !mv -- +49994484 + +-- !mv -- +49994480 + +-- !mv -- +49994476 + +-- !mv -- +49994472 + +-- !mv -- +49994468 + +-- !mv -- +49994464 + +-- !mv -- +49994460 + +-- !mv -- +49994456 + +-- !mv -- +49994452 + +-- !mv -- +49994448 + +-- !mv -- +49994444 + +-- !mv -- +49994440 + +-- !mv -- +49994436 + +-- !mv -- +49994432 + +-- !mv -- +49994428 + +-- !mv -- +49994424 + +-- !mv -- +49994420 + +-- !mv -- +49994416 + +-- !mv -- +49994412 + +-- !mv -- +49994408 + +-- !mv -- +49994404 + +-- !mv -- +49994400 + +-- !mv -- +49994396 + +-- !mv -- +49994392 + +-- !mv -- +49994388 + +-- !mv -- +49994384 + +-- !mv -- +49994380 + +-- !mv -- +49994376 + +-- !mv -- +49994372 + +-- !mv -- +49994368 + +-- !mv -- +49994364 + +-- !mv -- +49994360 + +-- !mv -- +49994356 + +-- !mv -- +49994352 + +-- !mv -- +49994348 + +-- !mv -- +49994344 + +-- !mv -- +49994340 + +-- !mv -- +49994336 + +-- !mv -- +49994332 + +-- !mv -- +49994328 + +-- !mv -- +49994324 + +-- !mv -- +49994320 + diff --git a/regression-test/suites/mv_p0/no_await/no_await.groovy b/regression-test/suites/mv_p0/no_await/no_await.groovy new file mode 100644 index 0000000000..42f50095d5 --- /dev/null +++ b/regression-test/suites/mv_p0/no_await/no_await.groovy @@ -0,0 +1,142 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import org.codehaus.groovy.runtime.IOGroovyMethods + +suite ("no_await") { + + def waitDrop = { + def try_times = 100 + def result = "null" + while (!result.contains("FINISHED")) { + result = (sql "SHOW ALTER TABLE MATERIALIZED VIEW ORDER BY CreateTime DESC LIMIT 1;")[0] + Thread.sleep(500) + try_times -= 1 + assertTrue(try_times > 0) + } + + sql "drop materialized view k12s3m on agg_have_dup_base;" + while (!(sql "show create materialized view k12s3m on agg_have_dup_base;").empty) { + sleep(100) + try_times -= 1 + assertTrue(try_times > 0) + } + } + + sql 'drop table if exists agg_have_dup_base' + sql ''' + create table agg_have_dup_base ( + k1 int null, + k2 int not null, + k3 bigint null, + k4 varchar(100) null + ) + duplicate key (k1, k2, k3) + distributed by hash(k1) buckets 3 + properties("replication_num" = "1"); + ''' + sql "insert into agg_have_dup_base select e1, -4, -4, 'd' from (select 1 k1) as t lateral view explode_numbers(10000) tmp1 as e1;" + // do not await + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' + + waitDrop() + sql "create materialized view k12s3m as select k1,sum(k2),max(k2) from agg_have_dup_base group by k1;" + sql 'insert into agg_have_dup_base select -4, -4, -4, \'d\'' + qt_mv 'select sum(k1) from agg_have_dup_base' +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org