seawinde commented on code in PR #34781:
URL: https://github.com/apache/doris/pull/34781#discussion_r1618080229


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializedViewUtils.java:
##########
@@ -95,17 +97,31 @@ public static Optional<RelatedTableInfo> 
getRelatedTableInfo(String column, Plan
         if (!columnSlot.isColumnFromTable()) {
             return Optional.empty();
         }
-        // check sql pattern
-        IncrementCheckerContext context = new 
IncrementCheckerContext(columnSlot);
-        materializedViewPlan.accept(MaterializedViewIncrementChecker.INSTANCE, 
context);
-        if (context.getPartitionRelatedTableAndColumnList().isEmpty() || 
!context.isPctPossible()) {
+        // Collect table relation map which is used to identify self join
+        List<Object> catalogRelationObjs = materializedViewPlan.collectToList(
+                planTreeNode -> planTreeNode instanceof CatalogRelation);
+        ImmutableMultimap.Builder<TableIdentifier, CatalogRelation> 
tableCatalogRelationMultimapBuilder =
+                ImmutableMultimap.builder();

Review Comment:
   ImmutableMultimap.Builder seems doesn't have expectedSize builder



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to