[Chore](materialized-view) forbid create mv on row store table (#35360)

forbid create mv on row store table
This commit is contained in:
Pxl
2024-05-27 10:50:57 +08:00
committed by yiguolei
parent 7284b6959f
commit 82ff29faea
4 changed files with 42 additions and 27 deletions

View File

@ -473,6 +473,9 @@ public class MaterializedViewHandler extends AlterHandler {
if (olapTable.getEnableUniqueKeyMergeOnWrite()) {
throw new DdlException("MergeOnWrite table can't create materialized view.");
}
if (olapTable.getRowStoreCol() != null) {
throw new DdlException("RowStore table can't create materialized view.");
}
// check if mv columns are valid
// a. Aggregate table:
// 1. all slot's aggregationType must same with value mv column
@ -630,6 +633,9 @@ public class MaterializedViewHandler extends AlterHandler {
if (olapTable.getEnableUniqueKeyMergeOnWrite()) {
throw new DdlException("MergeOnWrite table can't create materialized view.");
}
if (olapTable.getRowStoreCol() != null) {
throw new DdlException("RowStore table can't create materialized view.");
}
String rollupIndexName = addRollupClause.getRollupName();
List<String> rollupColumnNames = addRollupClause.getColumnNames();
if (changeStorageFormat) {