Skip to content

Commit

Permalink
modify test
Browse files Browse the repository at this point in the history
  • Loading branch information
seawinde committed Dec 2, 2024
1 parent eb9ca0c commit dffce5e
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,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 @@ -175,38 +175,44 @@ suite("mtmv_range_datetime_part_up_rewrite") {
sql """insert into lineitem_range_datetime_union values
(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')"""
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');"""
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 dffce5e

Please sign in to comment.