github-actions[bot] commented on code in PR #69435:
URL: https://github.com/apache/doris/pull/69435#discussion_r4345195525
##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/ivm/IvmNormalizeDupKeysMTMV.java:
##########
@@ -77,15 +75,15 @@ public Plan visit(Plan plan, Set<TableNameInfo>
excludedTriggerTables) {
@Override
public Plan visitLogicalOlapScan(LogicalOlapScan scan, Set<TableNameInfo>
excludedTriggerTables) {
- OlapTable table = scan.getTable();
- if (table.getKeysType() != KeysType.DUP_KEYS) {
+ if (!scan.isChangelogAppendOnly()) {
// An AnalysisException rather than an IvmException: a refresh
turns every IvmException into a
// fallback, which would express "the premise of this MV is
broken" as "try a complete refresh",
// even though that refresh runs this same normalize and fails the
same way. The premise being
// broken is not a retry.
throw new AnalysisException(
- "IVM detail MV error: table " + table.getName() + " is " +
table.getKeysType()
- + ", but a detail MV can only be built over
duplicate-key detail tables");
+ "IVM detail MV error: table " + scan.getTable().getName()
+ + " does not provide an append-only changelog, but
a detail MV can only be "
+ + "built over scans whose changelog contains only
appends");
Review Comment:
[P2] Update the regression expectation for the new error text
`test_ivm_append_only_dup_mv_3.groovy:312-315` still expects `can only be
built over duplicate-key detail tables` when its DUP detail MV's base table is
replaced by a UNIQUE/MOW table. That dry-run reaches this branch, but the new
message no longer contains the expected substring; `TestAction.run()` checks
`msg.contains(exception)`, so the existing regression suite fails despite
correctly rejecting the changed base table. Update that expectation along with
this diagnostic (or preserve the expected wording).
--
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]