github-actions[bot] commented on code in PR #62410:
URL: https://github.com/apache/doris/pull/62410#discussion_r3081733986
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/UpdateMvByPartitionCommand.java:
##########
@@ -136,9 +144,10 @@ private static Map<TableIf, Set<Expression>>
constructTableWithPredicates(MTMV m
PartitionItem partitionItem =
mv.getPartitionItemOrAnalysisException(partitionName);
items.add(partitionItem);
}
+ Optional<Long> inverseOffsetHours =
getInverseHourOffsetForBaseFilter(mv);
ImmutableMap.Builder<TableIf, Set<Expression>> builder = new
ImmutableMap.Builder<>();
tableWithPartKey.forEach((table, colName) ->
Review Comment:
This only fixes the `statementContext.setMvRefreshPredicates(...)` path. The
optimizer's union-compensation path still reconstructs base-table filters from
partition names via `StructInfo.addFilterOnTableScan ->
PredicateAdder.visitLogicalCatalogRelation ->
constructPredicates(partitionHasDataItems, partitionSlot)` and that call still
uses the old no-offset overload. For an MV partitioned by
`date_trunc(date_add/sub(base_col, INTERVAL N HOUR), unit)`, that path will
continue to emit raw MV bounds instead of inverse-shifted base-table bounds, so
rewrite/compensation can still miss rows or target the wrong base partitions.
Please thread the same offset handling through that parallel path as well.
--
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]