yujun777 commented on code in PR #69851:
URL: https://github.com/apache/doris/pull/69851#discussion_r4422551421
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/IvmFullRefreshMTMV.java:
##########
@@ -86,7 +86,12 @@ private Plan rewriteScan(LogicalOlapScan scan,
IvmRewriteContext rewriteContext)
Optional<Set<Long>> resetPartitionIds =
rewriteContext.getFullRefreshResetPartitionIds(baseTableInfo);
StreamReadMode readMode;
- if (resetPartitionIds.isPresent()) {
+ if (rewriteContext.isExplain() || resetPartitionIds.isPresent()) {
Review Comment:
Following up on the decision: an opt-in degraded mode for this state was
considered and is deliberately not being added. The options were an
EXPLAIN-time flag (e.g. `COMPLETE WITH FALLBACK`) that plans an unusable
stream's base table as an ordinary scan, or an EXPLAIN-specific error message.
The flag is deferred because the plan it produces is not the read the refresh
performs after `reconcileIvmStreams()` — the reconcile creates a fresh stream
that is then read with RESET — so it would be least faithful exactly where it
is used, and because `EXPLAIN REFRESH ... INCREMENTAL` fails on the same state,
so a COMPLETE-only flag would make the two explain modes disagree. Keeping the
default as an error is intentional: the message names the stream, and the next
COMPLETE refresh repairs it. If this proves noisy in practice, the intended
follow-up is an EXPLAIN-specific message pointing at the reconcile rather than
a plan built without it.
--
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]