Skip to content

Commit

Permalink
[UT] Fix unstable test_mv_rewrite_with_time_series_multi_mvs (#52583)
Browse files Browse the repository at this point in the history
Signed-off-by: shuming.li <[email protected]>
  • Loading branch information
LiShuMing authored Nov 4, 2024
1 parent 04c3dda commit ba168a6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ from t0 group by date_trunc('month', ts);
-- result:
-- !result
refresh materialized view test_mv3 with sync mode;
[UC]analyze table test_mv1 WITH SYNC MODE;
-- result:
test_db_8d93f2d33c72496aa3925e2bb2c40af3.test_mv1 analyze status OK
-- !result
[UC]analyze table test_mv2 WITH SYNC MODE;
-- result:
test_db_8d93f2d33c72496aa3925e2bb2c40af3.test_mv2 analyze status OK
-- !result
[UC]analyze table test_mv3 WITH SYNC MODE;
-- result:
test_db_8d93f2d33c72496aa3925e2bb2c40af3.test_mv3 analyze status OK
-- !result
set enable_materialized_view_rewrite=true;
-- result:
-- !result
Expand Down Expand Up @@ -164,6 +176,18 @@ from test_mv2 group by date_trunc('month', dt);
-- result:
-- !result
refresh materialized view test_mv3 with sync mode;
[UC]analyze table test_mv1 WITH SYNC MODE;
-- result:
test_db_8d93f2d33c72496aa3925e2bb2c40af3.test_mv1 analyze status OK
-- !result
[UC]analyze table test_mv2 WITH SYNC MODE;
-- result:
test_db_8d93f2d33c72496aa3925e2bb2c40af3.test_mv2 analyze status OK
-- !result
[UC]analyze table test_mv3 WITH SYNC MODE;
-- result:
test_db_8d93f2d33c72496aa3925e2bb2c40af3.test_mv3 analyze status OK
-- !result
function: print_hit_materialized_views("select sum(v1), sum(v2) from t0 where ts > '2020-02-23 12:12:00' order by 1;")
-- result:
test_mv1,test_mv2,test_mv3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ PROPERTIES (
from t0 group by date_trunc('month', ts);
refresh materialized view test_mv3 with sync mode;

-- analyze mvs to make this case more stable
[UC]analyze table test_mv1 WITH SYNC MODE;
[UC]analyze table test_mv2 WITH SYNC MODE;
[UC]analyze table test_mv3 WITH SYNC MODE;

set enable_materialized_view_rewrite=true;

function: print_hit_materialized_views("select sum(v1), sum(v2) from t0 where ts > '2020-02-23 12:12:00' order by 1;")
Expand Down Expand Up @@ -98,6 +103,11 @@ from test_mv2 group by date_trunc('month', dt);

refresh materialized view test_mv3 with sync mode;

-- analyze mvs to make this case more stable
[UC]analyze table test_mv1 WITH SYNC MODE;
[UC]analyze table test_mv2 WITH SYNC MODE;
[UC]analyze table test_mv3 WITH SYNC MODE;

function: print_hit_materialized_views("select sum(v1), sum(v2) from t0 where ts > '2020-02-23 12:12:00' order by 1;")
function: print_hit_materialized_views("select sum(v1), sum(v2) from t0 where ts >= '2020-03-23 12:12:00' order by 1;")
function: print_hit_materialized_views("select sum(v1), sum(v2) from t0 where ts < '2020-04-23 12:12:00' order by 1;")
Expand Down

0 comments on commit ba168a6

Please sign in to comment.