[Fix](nereids) add checkBlockRules() check for create view and alter view (#34104)

This commit is contained in:
feiniaofeiafei
2024-05-23 18:04:19 +08:00
committed by yiguolei
parent d85ea83b73
commit bd4dd94c24
3 changed files with 32 additions and 0 deletions

View File

@ -36,6 +36,7 @@ public class AlterViewCommand extends Command implements ForwardWithSync {
@Override
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
executor.checkBlockRules();
alterViewInfo.init(ctx);
alterViewInfo.validate(ctx);
AlterViewStmt alterViewStmt = alterViewInfo.translateToLegacyStmt(ctx);

View File

@ -36,6 +36,7 @@ public class CreateViewCommand extends Command implements ForwardWithSync {
@Override
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
executor.checkBlockRules();
createViewInfo.init(ctx);
createViewInfo.validate(ctx);
CreateViewStmt createViewStmt = createViewInfo.translateToLegacyStmt(ctx);