github-actions[bot] commented on code in PR #68648:
URL: https://github.com/apache/doris/pull/68648#discussion_r4236883925
##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRelatedPartitionDescTransferGenerator.java:
##########
@@ -46,17 +46,27 @@ public class MTMVRelatedPartitionDescTransferGenerator
implements MTMVRelatedPar
public void apply(MTMVPartitionInfo mvPartitionInfo, Map<String, String>
mvProperties,
RelatedPartitionDescResult lastResult, List<Column>
partitionColumns,
Map<List<String>, Set<String>> queryUsedPartitionMap)
throws AnalysisException {
- Map<MTMVRelatedTableIf, Map<PartitionKeyDesc, Set<String>>> descs =
lastResult.getDescs();
+ Map<PartitionKeyDesc, Map<MTMVRelatedTableIf, Set<String>>> merged =
Review Comment:
[P1] Preserve each PCT table's partition identity in union compensation
The new cross-table LIST merge makes a two-PCT `LIST(d,k)` MV buildable with
A.p1={1,2}, A.p2={3}, A.p3={4} and B.p1={4}, B.p2={2,3}, B.p3={1}; its MV
partitions are {1,2,3} and {4}. If {1,2,3} is valid and {4} stale, a grouped
join query with `a.d IN (1,4)` and `b.d IN (1,4)` needs A.p3 and B.p1 for the
stale branch. `PartitionCompensator.calcInvalidPartitions` instead unions those
physical *names* and applies {p1,p3} to both tables. The resulting base branch
reads d=1 as well as d=4, while the valid MV branch already supplies d=1;
`UNION ALL` duplicates committed rows. This differs from the earlier full-tuple
predicate issue because p1 denotes different keys in A and B. Keep compensation
sets per table (or expand by descriptors), and add a two-PCT partial-union
regression with reused names.
--
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]