You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2023/01/17 08:34:31 UTC
[GitHub] [doris] adonis0147 commented on a diff in pull request #16006: [fix](MTMV) Refine the process of refreshing data
adonis0147 commented on code in PR #16006:
URL: https://github.com/apache/doris/pull/16006#discussion_r1071903491
##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -137,29 +137,17 @@ public void processDropMaterializedView(DropMaterializedViewStmt stmt) throws Dd
if (!stmt.isForMTMV() && stmt.getTableName() == null) {
throw new DdlException("Drop materialized view without table name is unsupported : " + stmt.toSql());
}
- TableName tableName = !stmt.isForMTMV() ? stmt.getTableName() : stmt.getMTMVName();
- Database db;
- OlapTable olapTable;
- if (stmt.isIfExists()) {
- try {
- String dbName = tableName.getDb();
- db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
- String name = tableName.getTbl();
- olapTable = (OlapTable) db.getTableOrMetaException(name,
- !stmt.isForMTMV() ? TableType.OLAP : TableType.MATERIALIZED_VIEW);
- } catch (Exception e) {
- LOG.info("db or table not exists, msg={}", e.getMessage());
Review Comment:
> why remove the code ?
Because there are some redundant code, we can simplify them.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org