Skip to content

Commit

Permalink
fix regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
seawinde committed Oct 22, 2024
1 parent 779d25f commit a2bbddf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ class Suite implements GroovyInterceptable {
for (String mv_name : mv_names) {
def splitResult = result.split("MaterializedViewRewriteFail")
def each_result = splitResult.length == 2 ? splitResult[0].contains(mv_name) : false
success = success && each_result
success = success && (result.contains"(${mv_name})" || each_result)
}
Assert.assertEquals(true, success)
}
Expand Down Expand Up @@ -1640,7 +1640,7 @@ class Suite implements GroovyInterceptable {
for (String mv_name : mv_names) {
def splitResult = result.split("MaterializedViewRewriteFail")
def each_result = splitResult.length == 2 ? splitResult[0].contains(mv_name) : false
success = success || each_result
success = success || (result.contains"(${mv_name})" || each_result)
}
Assert.assertEquals(true, success)
}
Expand Down Expand Up @@ -1669,7 +1669,7 @@ class Suite implements GroovyInterceptable {
sql("${query_sql}")
check { result ->
def splitResult = result.split("MaterializedViewRewriteFail")
splitResult.length == 2 ? splitResult[0].contains(mv_name) : false
result.contains"(${mv_name})" || (splitResult.length == 2 ? splitResult[0].contains(mv_name) : false)
}
}
return
Expand Down
2 changes: 1 addition & 1 deletion regression-test/suites/mtmv_p0/test_create_mv_mtmv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ suite("test_create_mv_mtmv","mtmv") {
order_qt_refresh_mv "SELECT * FROM ${mvName}"
order_qt_sync_mv "SELECT k2 FROM ${mvName}"

mv_rewrite_success_without_check_chosen("""SELECT k2 FROM ${mvName}""", "mv_mtmv1", true)
mv_rewrite_success_without_check_chosen("""SELECT k2 FROM ${mvName}""", "mv_mtmv1")

sql """DROP MATERIALIZED VIEW mv_mtmv1 ON ${mvName};"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ suite("agg_on_none_agg") {
bin(o_orderkey);
"""
order_qt_query3_0_before "${query3_0}"
async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0")
async_mv_rewrite_success_without_check_chosen(db, mv3_0, query3_0, "mv3_0", true)
order_qt_query3_0_after "${query3_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_0"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ suite("variant_mv") {
cast(repo['name'] as varchar(100));
"""
order_qt_query2_1_before "${query2_1}"
async_mv_rewrite_success(db, mv2_1, query2_1, "mv2_1")
async_mv_rewrite_success_without_check_chosen(db, mv2_1, query2_1, "mv2_1", true)
order_qt_query2_1_after "${query2_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_1"""

Expand Down

0 comments on commit a2bbddf

Please sign in to comment.