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 21, 2024
1 parent 1ea3ad4 commit 6f1d798
Show file tree
Hide file tree
Showing 10 changed files with 129 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ suite ("k123p_nereids") {

qt_select_mv_constant """select bitmap_empty() from d_table where true;"""

mv_rewrite_success("select k2 from d_table where k1=1 and (k1>2 or k1 < 0) order by k2;", "kwh1")
mv_rewrite_fail("select k2 from d_table where k1=1 and (k1>2 or k1 < 0) order by k2;", "kwh1")

qt_select_mv "select k2 from d_table where k1=1 and (k1>2 or k1 < 0) order by k2;"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ suite("agg_on_none_agg") {
o_shippriority;
"""
order_qt_query2_0_before "${query2_0}"
check_mv_rewrite_fail(db, mv2_0, query2_0, "mv2_0")
async_mv_rewrite_fail(db, mv2_0, query2_0, "mv2_0")
order_qt_query2_0_after "${query2_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_0"""

Expand All @@ -243,7 +243,7 @@ suite("agg_on_none_agg") {
l_suppkey;
"""
order_qt_query2_1_before "${query2_1}"
check_mv_rewrite_fail(db, mv2_1, query2_1, "mv2_1")
async_mv_rewrite_fail(db, mv2_1, query2_1, "mv2_1")
order_qt_query2_1_after "${query2_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_1"""

Expand Down Expand Up @@ -291,7 +291,7 @@ suite("agg_on_none_agg") {
"""
order_qt_query3_1_before "${query3_1}"
// the filter slot used in query can not be found from mv
check_mv_rewrite_fail(db, mv3_1, query3_1, "mv3_1")
async_mv_rewrite_fail(db, mv3_1, query3_1, "mv3_1")
order_qt_query3_1_after "${query3_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_1"""

Expand All @@ -316,7 +316,7 @@ suite("agg_on_none_agg") {
"""
order_qt_query3_2_before "${query3_2}"
// the filter slot used in query can not be found from mv
check_mv_rewrite_fail(db, mv3_2, query3_2, "mv3_2")
async_mv_rewrite_fail(db, mv3_2, query3_2, "mv3_2")
order_qt_query3_2_after "${query3_2}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_2"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ suite("aggregate_without_roll_up") {
o_comment;
"""
order_qt_query1_0_before "${query1_0}"
check_mv_rewrite_success(db, mv1_0, query1_0, "mv1_0")
async_mv_rewrite_success(db, mv1_0, query1_0, "mv1_0")
order_qt_query1_0_after "${query1_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_0"""

Expand Down Expand Up @@ -204,7 +204,7 @@ suite("aggregate_without_roll_up") {
"O_SHIPPRIORITY, " +
"O_COMMENT "
order_qt_query1_1_before "${query1_1}"
check_mv_rewrite_success(db, mv1_1, query1_1, "mv1_1")
async_mv_rewrite_success(db, mv1_1, query1_1, "mv1_1")
order_qt_query1_1_after "${query1_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_1"""

Expand Down Expand Up @@ -257,7 +257,7 @@ suite("aggregate_without_roll_up") {
"O_SHIPPRIORITY, " +
"O_COMMENT "
order_qt_query1_2_before "${query1_2}"
check_mv_rewrite_success(db, mv1_2, query1_2, "mv1_2")
async_mv_rewrite_success(db, mv1_2, query1_2, "mv1_2")
order_qt_query1_2_after "${query1_2}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv1_2"""

Expand Down Expand Up @@ -304,7 +304,7 @@ suite("aggregate_without_roll_up") {
"O_SHIPPRIORITY, " +
"O_COMMENT "
order_qt_query2_0_before "${query2_0}"
check_mv_rewrite_success(db, mv2_0, query2_0, "mv2_0")
async_mv_rewrite_success(db, mv2_0, query2_0, "mv2_0")
order_qt_query2_0_after "${query2_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv2_0"""

Expand Down Expand Up @@ -351,7 +351,7 @@ suite("aggregate_without_roll_up") {
"from orders " +
"where O_ORDERDATE < '2023-12-30' and O_ORDERDATE > '2023-12-01'"
order_qt_query3_0_before "${query3_0}"
check_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0")
async_mv_rewrite_success(db, mv3_0, query3_0, "mv3_0")
order_qt_query3_0_after "${query3_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv3_0"""

Expand Down Expand Up @@ -383,7 +383,7 @@ suite("aggregate_without_roll_up") {
"l_partkey, " +
"l_suppkey"
order_qt_query13_0_before "${query13_0}"
check_mv_rewrite_success(db, mv13_0, query13_0, "mv13_0")
async_mv_rewrite_success(db, mv13_0, query13_0, "mv13_0")
order_qt_query13_0_after "${query13_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv13_0"""

Expand Down Expand Up @@ -416,7 +416,7 @@ suite("aggregate_without_roll_up") {
"l_partkey, " +
"l_suppkey"
order_qt_query14_0_before "${query14_0}"
check_mv_rewrite_success(db, mv14_0, query14_0, "mv14_0")
async_mv_rewrite_success(db, mv14_0, query14_0, "mv14_0")
order_qt_query14_0_after "${query14_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv14_0"""

Expand Down Expand Up @@ -449,7 +449,7 @@ suite("aggregate_without_roll_up") {
"l_partkey, " +
"l_suppkey"
order_qt_query15_0_before "${query15_0}"
check_mv_rewrite_success(db, mv15_0, query15_0, "mv15_0")
async_mv_rewrite_success(db, mv15_0, query15_0, "mv15_0")
order_qt_query15_0_after "${query15_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv15_0"""

Expand Down Expand Up @@ -486,7 +486,7 @@ suite("aggregate_without_roll_up") {
l_suppkey;
"""
order_qt_query15_1_before "${query15_1}"
check_mv_rewrite_success(db, mv15_1, query15_1, "mv15_1")
async_mv_rewrite_success(db, mv15_1, query15_1, "mv15_1")
order_qt_query15_0_after "${query15_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv15_1"""

Expand Down Expand Up @@ -517,7 +517,7 @@ suite("aggregate_without_roll_up") {
"l_partkey, " +
"l_suppkey"
order_qt_query16_0_before "${query16_0}"
check_mv_rewrite_success(db, mv16_0, query16_0, "mv16_0")
async_mv_rewrite_success(db, mv16_0, query16_0, "mv16_0")
order_qt_query16_0_after "${query16_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv16_0"""

Expand Down Expand Up @@ -582,7 +582,7 @@ suite("aggregate_without_roll_up") {
"l_partkey, " +
"l_suppkey"
order_qt_query17_0_before "${query17_0}"
check_mv_rewrite_success(db, mv17_0, query17_0, "mv17_0")
async_mv_rewrite_success(db, mv17_0, query17_0, "mv17_0")
order_qt_query17_0_after "${query17_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv17_0"""

Expand Down Expand Up @@ -641,7 +641,7 @@ suite("aggregate_without_roll_up") {
"orders.O_SHIPPRIORITY, " +
"orders.O_COMMENT "
order_qt_query17_1_before "${query17_1}"
check_mv_rewrite_success(db, mv17_1, query17_1, "mv17_1")
async_mv_rewrite_success(db, mv17_1, query17_1, "mv17_1")
order_qt_query17_1_after "${query17_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv17_1"""

Expand Down Expand Up @@ -670,7 +670,7 @@ suite("aggregate_without_roll_up") {
"l_shipdate, " +
"l_suppkey"
order_qt_query18_0_before "${query18_0}"
check_mv_rewrite_success(db, mv18_0, query18_0, "mv18_0")
async_mv_rewrite_success(db, mv18_0, query18_0, "mv18_0")
order_qt_query18_0_after "${query18_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv18_0"""

Expand All @@ -685,7 +685,7 @@ suite("aggregate_without_roll_up") {
"where o_custkey = 2 and l_linenumber = 4 " +
"group by l_linenumber, o_custkey "
order_qt_query18_1_before "${query18_1}"
check_mv_rewrite_success(db, mv18_1, query18_1, "mv18_1")
async_mv_rewrite_success(db, mv18_1, query18_1, "mv18_1")
order_qt_query18_1_after "${query18_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv18_1"""

Expand Down Expand Up @@ -729,7 +729,7 @@ suite("aggregate_without_roll_up") {
"l_partkey, " +
"l_suppkey"
order_qt_query19_0_before "${query19_0}"
check_mv_rewrite_success(db, mv19_0, query19_0, "mv19_0")
async_mv_rewrite_success(db, mv19_0, query19_0, "mv19_0")
order_qt_query19_0_after "${query19_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv19_0"""

Expand All @@ -743,7 +743,7 @@ suite("aggregate_without_roll_up") {
"inner join orders on lineitem.L_ORDERKEY = orders.O_ORDERKEY " +
"group by lineitem.L_LINENUMBER, orders.O_CUSTKEY "
order_qt_query19_1_before "${query19_1}"
check_mv_rewrite_success(db, mv19_1, query19_1, "mv19_1")
async_mv_rewrite_success(db, mv19_1, query19_1, "mv19_1")
order_qt_query19_1_after "${query19_1}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv19_1"""

Expand Down Expand Up @@ -789,7 +789,7 @@ suite("aggregate_without_roll_up") {
l_suppkey;
"""
order_qt_query19_2_before "${query19_2}"
check_mv_rewrite_success(db, mv19_2, query19_2, "mv19_2")
async_mv_rewrite_success(db, mv19_2, query19_2, "mv19_2")
order_qt_query19_2_after "${query19_2}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv19_2"""

Expand Down Expand Up @@ -825,7 +825,7 @@ suite("aggregate_without_roll_up") {
l_suppkey;
"""
order_qt_query19_3_before "${query19_3}"
check_mv_rewrite_success(db, mv19_3, query19_3, "mv19_3")
async_mv_rewrite_success(db, mv19_3, query19_3, "mv19_3")
order_qt_query19_3_after "${query19_3}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv19_3"""

Expand Down Expand Up @@ -874,7 +874,7 @@ suite("aggregate_without_roll_up") {
"on lineitem.L_ORDERKEY = orders.O_ORDERKEY " +
"where orders.O_ORDERDATE < '2023-12-30' and orders.O_ORDERDATE > '2023-12-01' "
order_qt_query20_0_before "${query20_0}"
check_mv_rewrite_success(db, mv20_0, query20_0, "mv20_0")
async_mv_rewrite_success(db, mv20_0, query20_0, "mv20_0")
order_qt_query20_0_after "${query20_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv20_0"""

Expand Down Expand Up @@ -975,7 +975,7 @@ suite("aggregate_without_roll_up") {
group by l_linenumber;
"""
order_qt_query21_0_before "${query21_0}"
check_mv_rewrite_success(db, mv21_0, query21_0, "mv21_0")
async_mv_rewrite_success(db, mv21_0, query21_0, "mv21_0")
order_qt_query21_0_after "${query21_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv21_0"""

Expand Down Expand Up @@ -1098,7 +1098,7 @@ suite("aggregate_without_roll_up") {
l_suppkey;
"""
order_qt_query22_0_before "${query22_0}"
check_mv_rewrite_success(db, mv22_0, query22_0, "mv22_0")
async_mv_rewrite_success(db, mv22_0, query22_0, "mv22_0")
order_qt_query22_0_after "${query22_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv22_0"""

Expand Down Expand Up @@ -1142,7 +1142,7 @@ suite("aggregate_without_roll_up") {
order by o_orderpriority;
"""
order_qt_query23_0_before "${query23_0}"
check_mv_rewrite_success(db, mv23_0, query23_0, "mv23_0")
async_mv_rewrite_success(db, mv23_0, query23_0, "mv23_0")
order_qt_query23_0_after "${query23_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv23_0"""

Expand Down Expand Up @@ -1227,7 +1227,7 @@ suite("aggregate_without_roll_up") {
o_orderpriority,
l_suppkey;
"""
check_mv_rewrite_success(db, mv24_0, query24_0, "mv24_0")
async_mv_rewrite_success(db, mv24_0, query24_0, "mv24_0")
sql """ DROP MATERIALIZED VIEW IF EXISTS mv24_0"""


Expand Down Expand Up @@ -1268,7 +1268,7 @@ suite("aggregate_without_roll_up") {
order by o_orderpriority;
"""
order_qt_query25_0_before "${query25_0}"
check_mv_rewrite_success(db, mv25_0, query25_0, "mv25_0")
async_mv_rewrite_success(db, mv25_0, query25_0, "mv25_0")
order_qt_query25_0_after "${query25_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv25_0"""

Expand Down Expand Up @@ -1310,7 +1310,7 @@ suite("aggregate_without_roll_up") {
order by o_orderpriority;
"""
order_qt_query26_0_before "${query26_0}"
check_mv_rewrite_success(db, mv26_0, query26_0, "mv26_0")
async_mv_rewrite_success(db, mv26_0, query26_0, "mv26_0")
order_qt_query26_0_after "${query26_0}"
sql """ DROP MATERIALIZED VIEW IF EXISTS mv26_0"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ suite("direct_query_mv") {
group by L_LINENUMBER;
""")
// mv2 use mv1, though query not use mv1 directly, mv2 should part in rewrite and shoule be chosen
check_mv_rewrite_success(db,
async_mv_rewrite_success(db,
"""
select L_LINENUMBER, count(O_CUSTKEY)
from mv1_0
Expand Down
Loading

0 comments on commit 6f1d798

Please sign in to comment.