Skip to content

Commit

Permalink
[BugFix] [UT] Fix test_transparent_mv_mysql test case (StarRocks#54556)
Browse files Browse the repository at this point in the history
Signed-off-by: shuming.li <ming.moriarty@gmail.com>
  • Loading branch information
LiShuMing authored Dec 31, 2024
1 parent b50610c commit f463e9a
Show file tree
Hide file tree
Showing 9 changed files with 308 additions and 271 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,19 @@ public TableCompensation getRefBaseTableCompensation(Table refBaseTable,
*/
public TableCompensation getRefBaseTableCompensationByPartitionKeys(Table refBaseTable,
Optional<LogicalScanOperator> scanOperatorOpt) {
Set<String> toRefreshPartitionNames = mvUpdateInfo.getBaseTableToRefreshPartitionNames(refBaseTable);
if (toRefreshPartitionNames == null) {
return TableCompensation.unknown();
}
if (toRefreshPartitionNames.isEmpty()) {
return TableCompensation.noCompensation();
}
if (refBaseTable.isNativeTableOrMaterializedView()) {
return OlapTableCompensation.build(refBaseTable, mvUpdateInfo, scanOperatorOpt);
} else if (MvPartitionCompensator.isSupportPartitionCompensate(refBaseTable)) {
return ExternalTableCompensation.build(refBaseTable, mvUpdateInfo, scanOperatorOpt);
} else {
// TODO: support more ref base table types
logMVRewrite(mv.getName(), "Unsupported ref base table type: {}", refBaseTable.getName());
return TableCompensation.unknown();
}
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/sql/test_agg_state/R/test_agg_state_with_async_mv.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- name: test_agg_state_with_async_mv
-- name: test_agg_state_with_async_mv @slow
CREATE TABLE t1 (
k1 date,
c0 boolean,
Expand Down
2 changes: 1 addition & 1 deletion test/sql/test_agg_state/R/test_agg_state_with_sync_mv.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- name: test_agg_state_with_sync_mv
-- name: test_agg_state_with_sync_mv @slow
CREATE TABLE t1 (
k1 date,
c0 boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- name: test_agg_state_table_with_all_functions
-- name: test_agg_state_table_with_all_functions @slow
-- This case can be generated by FE's AggStateCombinatorTest#generateSqlTesterTestsTotal test, it will test all supported aggregate functions in AggStateTable.
CREATE TABLE t1 (
k1 date,
Expand Down Expand Up @@ -87,7 +87,7 @@ v11 array_agg_distinct(char(100)),
v12 array_agg_distinct(date),
v13 array_agg_distinct(datetime),
v14 percentile_approx(double,double),
v15 percentile_approx(double,double,double),
v15 percentile_approx(double,double),
v16 covar_pop(double,double),
v17 covar_pop(float,float),
v18 covar_pop(boolean,boolean),
Expand Down
2 changes: 1 addition & 1 deletion test/sql/test_agg_state/T/test_agg_state_with_async_mv.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- name: test_agg_state_with_async_mv
-- name: test_agg_state_with_async_mv @slow
CREATE TABLE t1 (
k1 date,
c0 boolean,
Expand Down
2 changes: 1 addition & 1 deletion test/sql/test_agg_state/T/test_agg_state_with_sync_mv.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- name: test_agg_state_with_sync_mv
-- name: test_agg_state_with_sync_mv @slow
CREATE TABLE t1 (
k1 date,
c0 boolean,
Expand Down
350 changes: 175 additions & 175 deletions test/sql/test_transparent_mv/R/test_transparent_mv_mysql

Large diffs are not rendered by default.

172 changes: 86 additions & 86 deletions test/sql/test_transparent_mv/T/test_transparent_mv_mysql

Large diffs are not rendered by default.

0 comments on commit f463e9a

Please sign in to comment.