[MV](exec) disable create mv with select star (#22895)
This commit is contained in:
@ -208,6 +208,11 @@ public class CreateMaterializedViewStmt extends DdlStmt {
|
||||
*/
|
||||
for (int i = 0; i < selectList.getItems().size(); i++) {
|
||||
SelectListItem selectListItem = selectList.getItems().get(i);
|
||||
|
||||
if (selectListItem.isStar()) {
|
||||
throw new AnalysisException("The materialized view not support select star");
|
||||
}
|
||||
|
||||
Expr selectListItemExpr = selectListItem.getExpr();
|
||||
if (!(selectListItemExpr instanceof SlotRef) && !(selectListItemExpr instanceof FunctionCallExpr)
|
||||
&& !(selectListItemExpr instanceof ArithmeticExpr)) {
|
||||
|
||||
@ -47,6 +47,11 @@ suite ("group_check") {
|
||||
exception "errCode = 2,"
|
||||
}
|
||||
|
||||
test {
|
||||
sql "create materialized view kgroup as select * from d_table where k1=1;"
|
||||
exception "errCode = 2,"
|
||||
}
|
||||
|
||||
createMV ("create materialized view kgroup as select k1,k2,sum(k3) from d_table group by k1,k2;")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user