the-other-tim-brown commented on code in PR #10578:
URL: https://github.com/apache/hudi/pull/10578#discussion_r1487098570
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bloom/HoodieBloomIndex.java:
##########
@@ -119,11 +119,11 @@ private HoodiePairData<HoodieKey, HoodieRecordLocation>
lookupIndex(
HoodiePairData<String, String> partitionRecordKeyPairs, final
HoodieEngineContext context,
final HoodieTable hoodieTable) {
// Step 1: Obtain records per partition, in the incoming records
- Map<String, Long> recordsPerPartition =
partitionRecordKeyPairs.countByKey();
- List<String> affectedPartitionPathList = new
ArrayList<>(recordsPerPartition.keySet());
+ HoodiePairData<String, Long> recordsPerPartition =
partitionRecordKeyPairs.mapToPair(pair -> Pair.of(pair.getLeft(),
1L)).reduceByKey(Long::sum, 1);
Review Comment:
@vinothchandar this is the main win I see in this 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]