stalary commented on code in PR #11218:
URL: https://github.com/apache/doris/pull/11218#discussion_r935026737
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/DropMaterializedViewStmt.java:
##########
@@ -49,8 +51,18 @@ public DropMaterializedViewStmt(boolean ifExists, String
mvName, TableName table
this.ifExists = ifExists;
}
+ public DropMaterializedViewStmt(boolean ifExists, TableName mvName) {
+ this.mtmvName = mvName;
+ this.ifExists = ifExists;
+ this.tableName = null;
+ }
+
public String getMvName() {
- return mvName;
+ if (mtmvName != null) {
+ return mvName;
+ } else {
+ return mtmvName.toString();
Review Comment:
NPE may occur if mtmvName is null.
##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -127,6 +138,10 @@ public void
processDropMaterializedView(DropMaterializedViewStmt stmt) throws Dd
((MaterializedViewHandler)
materializedViewHandler).processDropMaterializedView(stmt, db, olapTable);
}
+ public void processRefreshMaterializedView(RefreshMaterializedViewStmt
stmt) throws DdlException {
+ throw new DdlException("DROP MATERIALIZED VIEW is not implemented: " +
stmt.toSql());
Review Comment:
```suggestion
throw new DdlException("Refresh materialized view is not
implemented: " + stmt.toSql());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]