morrySnow commented on code in PR #27922: URL: https://github.com/apache/doris/pull/27922#discussion_r1418755526
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/RelationId.java: ########## @@ -46,4 +46,14 @@ public RelationId getNextId() { public String toString() { return "RelationId#" + id; } + + @Override + public boolean equals(Object obj) { + return super.equals(obj); + } + + @Override + public int hashCode() { + return super.hashCode(); + } Review Comment: Unnecessary code ########## fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java: ########## @@ -576,6 +577,9 @@ private void executeByNereids(TUniqueId queryId) throws Exception { } // create plan planner = new NereidsPlanner(statementContext); + if (context.getSessionVariable().isEnableMaterializedViewRewrite()) { + planner.addHook(InitMaterializationContextHook.INSTANCE); + } Review Comment: it is better do this when init planner? ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/ExprId.java: ########## @@ -45,4 +45,14 @@ public ExprId getNextId() { public String toString() { return "" + id; } + + @Override + public boolean equals(Object obj) { + return super.equals(obj); + } + + @Override + public int hashCode() { + return super.hashCode(); + } Review Comment: Unnecessary code ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/visitor/TableCollector.java: ########## @@ -39,7 +39,7 @@ public class TableCollector extends DefaultPlanVisitor<Void, TableCollectorConte public Void visit(Plan plan, TableCollectorContext context) { if (plan instanceof CatalogRelation) { TableIf table = ((CatalogRelation) plan).getTable(); - if (context.getTargetTableTypes().contains(table.getType())) { + if (context.getTargetTableTypes().isEmpty() || context.getTargetTableTypes().contains(table.getType())) { Review Comment: why add isEmpty? should add some comment to explain it -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org