Skip to content

Commit

Permalink
fix-rt
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Aug 8, 2024
1 parent e0a6a7c commit dff6fc8
Showing 1 changed file with 47 additions and 46 deletions.
93 changes: 47 additions & 46 deletions regression-test/suites/mv_p0/partition_prune/partition_prune.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -217,54 +217,55 @@ suite("partition_prune") {
}
order_qt_query2_after "${query2}"

// test partition prune in aggregate table
def mv3 = """
select
app_name,
event_id,
time,
sum(price)
from
test_aggregate
where time < '2024-07-11 01:00:00'
group by
app_name,
event_id,
time;
"""
// // test partition prune in aggregate table
// def mv3 = """
// select
// app_name,
// event_id,
// time,
// sum(price)
// from
// test_aggregate
// where time < '2024-07-11 01:00:00'
// group by
// app_name,
// event_id,
// time;
// """

def query3 = """
select
app_name,
event_id,
time,
sum(price)
from
test_aggregate
where time < '2024-07-05 01:00:00'
group by
app_name,
time,
event_id;
"""
// def query3 = """
// select
// app_name,
// event_id,
// time,
// sum(price)
// from
// test_aggregate
// where time < '2024-07-05 01:00:00'
// group by
// app_name,
// time,
// event_id;
// """


order_qt_query3_before "${query3}"
createMV("""
CREATE MATERIALIZED VIEW mv3
AS
${mv3}
""")
// wait partition row count report
sleep(10000)
sql "analyze table test_aggregate with sync;"

explain {
sql("""${query3}""")
check {result ->
result.contains("(mv3)") && result.contains("partitions=5")
}
}
order_qt_query3_after "${query3}"
// order_qt_query3_before "${query3}"
// createMV("""
// CREATE MATERIALIZED VIEW mv3
// AS
// ${mv3}
// """)
// // wait partition row count report
// sleep(10000)
// sql "analyze table test_aggregate with sync;"
// def memo3=sql "explain memo plan ${query3}"
// print(memo3)
// explain {
// sql("""${query3}""")
// check {result ->
// result.contains("(mv3)") && result.contains("partitions=5")
// }
// }
// order_qt_query3_after "${query3}"

}

0 comments on commit dff6fc8

Please sign in to comment.