Skip to content

Commit

Permalink
[Chore](case) adjust some mv regression test case (apache#26279)
Browse files Browse the repository at this point in the history
adjust some mv regression test case
  • Loading branch information
BiteTheDDDDt authored Nov 2, 2023
1 parent 3004dbb commit 1f9fdac
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 44 deletions.
4 changes: 4 additions & 0 deletions regression-test/suites/mv_p0/no_await/no_await.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ suite ("no_await") {
sql "sync;"
while (!result.contains("FINISHED")) {
result = (sql "SHOW ALTER TABLE MATERIALIZED VIEW WHERE TableName='${tblName}' ORDER BY CreateTime DESC LIMIT 1;")[0]
if (result.contains("CANCELLED")) {
log.info("result: ${result}")
assertTrue(false)
}
Thread.sleep(1100)
try_times -= 1
assertTrue(try_times > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,7 @@ suite ("test_dup_mv_bitmap_hash") {
}
qt_select_mv "select bitmap_union_count(to_bitmap(k2)) from d_table group by k1 order by k1;"

result = "null"
sql "create materialized view k1g3bm as select k1,bitmap_union(bitmap_hash(k3)) from d_table group by k1;"
while (!result.contains("FINISHED")){
result = sql "SHOW ALTER TABLE MATERIALIZED VIEW WHERE TableName='d_table' ORDER BY CreateTime DESC LIMIT 1;"
result = result.toString()
logger.info("result: ${result}")
if(result.contains("CANCELLED")){
return
}
Thread.sleep(1000)
}
createMV "create materialized view k1g3bm as select k1,bitmap_union(bitmap_hash(k3)) from d_table group by k1;"

sql "insert into d_table select 2,2,'bb';"
sql "insert into d_table select 3,3,'c';"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,7 @@ suite ("test_dup_mv_year") {
}
qt_select_mv "select k1,year(k2) from d_table order by k1;"

def result = "null"
sql "create materialized view k13y as select k1,year(k3) from d_table;"
while (!result.contains("FINISHED")){
result = sql "SHOW ALTER TABLE MATERIALIZED VIEW WHERE TableName='d_table' ORDER BY CreateTime DESC LIMIT 1;"
result = result.toString()
logger.info("result: ${result}")
if(result.contains("CANCELLED")){
return
}
Thread.sleep(1000)
}
createMV "create materialized view k13y as select k1,year(k3) from d_table;"

sql "insert into d_table select 4,'2033-12-31','2033-12-31 01:02:03';"
Thread.sleep(1000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,7 @@ suite ("dup_mv_bm_hash") {
}
order_qt_select_mv "select bitmap_union_count(to_bitmap(k2)) from dup_mv_bm_hash group by k1 order by k1;"

result = "null"
sql "create materialized view dup_mv_bm_hash_mv2 as select k1,bitmap_union(bitmap_hash(k3)) from dup_mv_bm_hash group by k1;"
while (!result.contains("FINISHED")){
result = sql "SHOW ALTER TABLE MATERIALIZED VIEW WHERE TableName='dup_mv_bm_hash' ORDER BY CreateTime DESC LIMIT 1;"
result = result.toString()
logger.info("result: ${result}")
if(result.contains("CANCELLED")){
return
}
Thread.sleep(1000)
}
createMV("create materialized view dup_mv_bm_hash_mv2 as select k1,bitmap_union(bitmap_hash(k3)) from dup_mv_bm_hash group by k1;")

sql "SET experimental_enable_nereids_planner=false"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,8 @@ suite ("dup_mv_year") {
}
order_qt_select_mv "select k1,year(k2) from dup_mv_year order by k1;"

result = "null"
sql "create materialized view k13y as select k1,year(k3) from dup_mv_year;"
while (!result.contains("FINISHED")){
result = sql "SHOW ALTER TABLE MATERIALIZED VIEW WHERE TableName='dup_mv_year' ORDER BY CreateTime DESC LIMIT 1;"
result = result.toString()
logger.info("result: ${result}")
if(result.contains("CANCELLED")){
return
}
Thread.sleep(1000)
}
createMV "create materialized view k13y as select k1,year(k3) from dup_mv_year;"

sql "SET experimental_enable_nereids_planner=false"


Expand Down

0 comments on commit 1f9fdac

Please sign in to comment.