seawinde commented on code in PR #51700: URL: https://github.com/apache/doris/pull/51700#discussion_r2149187612
########## fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java: ########## @@ -427,8 +413,13 @@ protected void rewrite(boolean showPlanProcess) { statementContext.getConnectContext().getExecutor().getSummaryProfile().setNereidsRewriteTime(); } // collect partitions table used, this is for query rewrite by materialized view - // this is needed before init hook - collectTableUsedPartitions(showPlanProcess); + // this is needed before init hook, because + MaterializedViewUtils.collectTableUsedPartitions(cascadesContext.getRewritePlan(), cascadesContext); Review Comment: move it in hook -- 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