seawinde commented on code in PR #29227:
URL: https://github.com/apache/doris/pull/29227#discussion_r1437939047
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/mapping/RelationMapping.java:
##########
@@ -59,54 +61,84 @@ public static RelationMapping
of(ImmutableBiMap<MappedRelation, MappedRelation>
*/
public static List<RelationMapping> generate(List<CatalogRelation>
sources, List<CatalogRelation> targets) {
// Construct tmp map, key is the table qualifier, value is the
corresponding catalog relations
- LinkedListMultimap<Long, MappedRelation> sourceTableRelationIdMap =
LinkedListMultimap.create();
+ HashMultimap<Long, MappedRelation> sourceTableRelationIdMap =
HashMultimap.create();
for (CatalogRelation relation : sources) {
sourceTableRelationIdMap.put(getTableQualifier(relation.getTable()),
MappedRelation.of(relation.getRelationId(), relation));
}
- LinkedListMultimap<Long, MappedRelation> targetTableRelationIdMap =
LinkedListMultimap.create();
+ HashMultimap<Long, MappedRelation> targetTableRelationIdMap =
HashMultimap.create();
for (CatalogRelation relation : targets) {
targetTableRelationIdMap.put(getTableQualifier(relation.getTable()),
MappedRelation.of(relation.getRelationId(), relation));
}
Set<Long> sourceTableKeySet = sourceTableRelationIdMap.keySet();
- List<List<Pair<MappedRelation, MappedRelation>>> mappedRelations = new
ArrayList<>();
+ List<List<RelationMapping>> mappedRelations = new ArrayList<>();
Review Comment:
I have discard `Pair<MappedRelation, MappedRelation>` and use `HashBiMap`
instead.
WDYT?
--
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]