seawinde commented on code in PR #37561:
URL: https://github.com/apache/doris/pull/37561#discussion_r1675137625


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java:
##########
@@ -286,6 +289,12 @@ private void analyze(boolean showPlanProcess) {
             LOG.debug("Start analyze plan");
         }
         keepOrShowPlanProcess(showPlanProcess, () -> 
cascadesContext.newAnalyzer().analyze());
+        if 
(this.cascadesContext.getConnectContext().getSessionVariable().isEnableDmlMaterializedViewRewrite()

Review Comment:
   if sql contains external table and the `set 
enable_dml_materialized_view_rewrite_when_base_table_unawareness = false;` can 
also allow external table.
   this control logic is in
   `Env.getCurrentEnv().getMtmvService().getRelationManager()
                   .getAvailableMTMVs(usedBaseTables, 
cascadesContext.getConnectContext(),
                           true, ((connectContext, mtmv) -> {
                               return MTMVUtil.mtmvContainsExternalTable(mtmv) 
&& (!connectContext.getSessionVariable()`



-- 
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

Reply via email to