github-actions[bot] commented on code in PR #67186:
URL: https://github.com/apache/doris/pull/67186#discussion_r3881088629


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/PreloadExternalMetadata.java:
##########
@@ -79,6 +95,64 @@ public ExternalMetadataPreloadResult 
executePreload(StatementContext statementCo
                 TimeUtils.getElapsedTimeMs(preloadStartTime));
     }
 
+    private void preloadCloudMtmvRefreshContexts(StatementContext 
statementContext) {
+        if (Config.isNotCloudMode()) {
+            return;
+        }
+        ConnectContext connectContext = statementContext.getConnectContext();
+        Map<MTMV, Set<MTMVRelatedTableIf>> eligibleMtmvs = new 
LinkedHashMap<>();
+        Set<MTMVRelatedTableIf> pctTables = new LinkedHashSet<>();
+        for (MTMV mtmv : statementContext.getCandidateMTMVs()) {

Review Comment:
   [P2] Apply USE_MV/NO_USE_MV before cloud preload and budget accounting. This 
collect-stage loop runs before Analyzer extracts those hints, while the actual 
hint filter is only applied later in getMaterializationContextByHint. 
Consequently bare NO_USE_MV and NO_USE_MV(A) still perform snapshot/version 
RPCs, and USE_MV(A) can lose A when A alone fits the limit but hinted-out 
candidates make this all-or-nothing union exceed it; the later cloud rewrite 
then rejects A because no context was preloaded. Share the same hint 
eligibility before collecting PCT tables/loading snapshots, and add zero-load 
NO_USE_MV plus filtered-budget USE_MV(A) tests.



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

Reply via email to