yujun777 commented on code in PR #69435:
URL: https://github.com/apache/doris/pull/69435#discussion_r4345448722
##########
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:
Fixed in db639863327: updated the `test_ivm_append_only_dup_mv_3`
expectation to `does not provide an append-only changelog`.
--
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]