Skip to content

Commit

Permalink
modify test
Browse files Browse the repository at this point in the history
  • Loading branch information
seawinde committed Dec 3, 2024
1 parent 0ab4522 commit 511652a
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ suite("mtmv_range_datetime_part_up_rewrite") {
for (int i = 0; i < mv_name_list.size(); i++) {
def job_name = getJobName(db, mv_name_list[i])
waitingMTMVTaskFinished(job_name)
mv_rewrite_success(query_stmt_list[i], mv_name_list[i])
mv_rewrite_any_success(query_stmt_list[i], mv_name_list)
compare_res(query_stmt_list[i] + " order by 1,2,3")
}

Expand All @@ -178,39 +178,45 @@ suite("mtmv_range_datetime_part_up_rewrite") {
(1, null, 3, 1, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy', '2023-11-29 03:00:00')"""
sql """alter table lineitem_range_datetime_union modify column l_comment set stats ('row_count'='8');"""
for (int i = 0; i < mv_name_list.size(); i++) {
mv_rewrite_success(query_stmt_list[i], mv_name_list[i])
// both mv should rewrite success
mv_rewrite_any_success(query_stmt_list[i], mv_name_list)
compare_res(query_stmt_list[i] + " order by 1,2,3")
}

for (int i = 0; i < mv_name_list.size(); i++) {
sql """refresh MATERIALIZED VIEW ${mv_name_list[i]} auto;"""
mv_rewrite_success(query_stmt_list[i], mv_name_list[i])
// both mv should rewrite success
mv_rewrite_any_success(query_stmt_list[i], mv_name_list)
compare_res(query_stmt_list[i] + " order by 1,2,3")
}

sql """insert into lineitem_range_datetime_union values
(3, null, 3, 1, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy', '2023-11-29 03:00:00');"""
sql """alter table lineitem_range_datetime_union modify column l_comment set stats ('row_count'='9');"""
for (int i = 0; i < mv_name_list.size(); i++) {
mv_rewrite_success(query_stmt_list[i], mv_name_list[i])
// both mv should rewrite success
mv_rewrite_any_success(query_stmt_list[i], mv_name_list)
compare_res(query_stmt_list[i] + " order by 1,2,3")
}

for (int i = 0; i < mv_name_list.size(); i++) {
sql """refresh MATERIALIZED VIEW ${mv_name_list[i]} auto;"""
mv_rewrite_success(query_stmt_list[i], mv_name_list[i])
// both mv should rewrite success
mv_rewrite_any_success(query_stmt_list[i], mv_name_list)
compare_res(query_stmt_list[i] + " order by 1,2,3")
}

sql """ALTER TABLE lineitem_range_datetime_union DROP PARTITION IF EXISTS p4 FORCE"""
for (int i = 0; i < mv_name_list.size(); i++) {
mv_rewrite_success(query_stmt_list[i], mv_name_list[i])
// both mv should rewrite success
mv_rewrite_any_success(query_stmt_list[i], mv_name_list)
compare_res(query_stmt_list[i] + " order by 1,2,3")
}

for (int i = 0; i < mv_name_list.size(); i++) {
sql """refresh MATERIALIZED VIEW ${mv_name_list[i]} auto;"""
mv_rewrite_success(query_stmt_list[i], mv_name_list[i])
// both mv should rewrite success
mv_rewrite_any_success(query_stmt_list[i], mv_name_list)
compare_res(query_stmt_list[i] + " order by 1,2,3")
}

Expand Down

0 comments on commit 511652a

Please sign in to comment.