morrySnow commented on code in PR #29453:
URL: https://github.com/apache/doris/pull/29453#discussion_r1441386808
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateMTMVInfo.java:
##########
@@ -224,7 +228,18 @@ public void analyzeQuery(ConnectContext ctx) {
}
getRelation(planner);
getColumns(plan);
- analyzePartition(planner);
+ SessionVariable sessionVariable =
statementContext.getConnectContext().getSessionVariable();
+ Set<String> tempDisableRules =
sessionVariable.getDisableNereidsRuleNames();
+ // Should not make table without data to empty relation, so add
disable rules
+ sessionVariable.setDisableNereidsRules(MTMV_PLANER_DISABLE_RULES);
+ try {
+ analyzePartition(planner);
+ } finally {
+ if (!tempDisableRules.isEmpty()) {
Review Comment:
should not add this `if`, always set back
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]