morrySnow commented on code in PR #49297: URL: https://github.com/apache/doris/pull/49297#discussion_r2043494676
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateMaterializedViewCommand.java: ########## @@ -199,22 +198,12 @@ private Pair<LogicalPlan, CascadesContext> analyzeAndRewriteLogicalPlan(LogicalP ConnectContext ctx) { StatementContext statementContext = ctx.getStatementContext(); NereidsPlanner planner = new NereidsPlanner(statementContext); - Set<String> tempDisableRules = ctx.getSessionVariable().getDisableNereidsRuleNames(); - ctx.getSessionVariable().setDisableNereidsRules(SYNC_MV_PLANER_DISABLE_RULES); - ctx.getStatementContext().invalidCache(SessionVariable.DISABLE_NEREIDS_RULES); - LogicalPlan plan; - try { - // disable rbo sync mv rewrite - ctx.getSessionVariable().setVarOnce(SessionVariable.ENABLE_SYNC_MV_COST_BASED_REWRITE, "true"); - // disable constant fold - ctx.getSessionVariable().setVarOnce(SessionVariable.DEBUG_SKIP_FOLD_CONSTANT, "true"); - plan = (LogicalPlan) planner.planWithLock(unboundPlan, PhysicalProperties.ANY, - ExplainCommand.ExplainLevel.REWRITTEN_PLAN); - } finally { - // after operate, roll back the disable rules - ctx.getSessionVariable().setDisableNereidsRules(String.join(",", tempDisableRules)); - ctx.getStatementContext().invalidCache(SessionVariable.DISABLE_NEREIDS_RULES); - } + // disable rbo sync mv rewrite + ctx.getSessionVariable().setVarOnce(SessionVariable.ENABLE_SYNC_MV_COST_BASED_REWRITE, "true"); Review Comment: comment is disable, but variable is true? -- 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