morrySnow commented on code in PR #34781:
URL: https://github.com/apache/doris/pull/34781#discussion_r1618159362
##########
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:
ImmutableMap.builderWithExpectedSize()
--
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]