starocean999 commented on code in PR #31970:
URL: https://github.com/apache/doris/pull/31970#discussion_r1517186836
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java:
##########
@@ -102,31 +103,33 @@ public OneRangePartitionEvaluator(long partitionId,
List<Slot> partitionSlots,
PartitionRangeExpander expander = new PartitionRangeExpander();
this.partitionSlotTypes = expander.computePartitionSlotTypes(lowers,
uppers);
- this.slotToType = IntStream.range(0, partitionSlots.size())
- .mapToObj(index -> Pair.of(partitionSlots.get(index),
partitionSlotTypes.get(index)))
- .collect(ImmutableMap.toImmutableMap(Pair::key, Pair::value));
+ this.slotToType =
Maps.newHashMapWithExpectedSize(partitionSlots.size() * 2);
Review Comment:
Minor: use Maps.newHashMapWithExpectedSize(partitionSlots.size()); may good
enough, can update the code in next pr
--
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]