[Bug](view) fix npe on create view with comment (#28189)

fix npe on create view with comment
This commit is contained in:
Pxl
2023-12-11 20:00:21 +08:00
committed by GitHub
parent d4f89389e3
commit f30cc1f6ef
2 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,7 @@ public class CreateViewStmt extends BaseViewStmt {
try {
if (cols != null) {
cloneStmt = viewDefStmt.clone();
cloneStmt.forbiddenMVRewrite();
}
// Analyze view define statement

View File

@ -72,6 +72,11 @@ suite("test_view2") {
sql """sync"""
sql """ DROP VIEW IF EXISTS rt_view;"""
sql """ DROP VIEW IF EXISTS tv;"""
sql """
create view tv (node comment "col node") as select node_name from tableA;
"""
sql """
CREATE VIEW rt_view AS