[Bug](view) fix npe on create view with comment (#28189)
fix npe on create view with comment
This commit is contained in:
@ -75,6 +75,7 @@ public class CreateViewStmt extends BaseViewStmt {
|
||||
try {
|
||||
if (cols != null) {
|
||||
cloneStmt = viewDefStmt.clone();
|
||||
cloneStmt.forbiddenMVRewrite();
|
||||
}
|
||||
|
||||
// Analyze view define statement
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user