codope commented on code in PR #12447:
URL: https://github.com/apache/hudi/pull/12447#discussion_r1888498250
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -919,4 +886,42 @@ private Map<String, HoodieRecord<HoodieMetadataPayload>>
fetchBaseFileAllRecords
return
SecondaryIndexKeyUtils.getRecordKeyFromSecondaryIndexKey(record.getRecordKey());
}, record -> record));
}
+
+ @VisibleForTesting
+ public static Map<String, String>
reverseLookupSecondaryKeysInternal(List<String> recordKeys,
+
Map<String, HoodieRecord<HoodieMetadataPayload>> baseFileRecords,
+
HoodieMetadataLogRecordReader logRecordScanner) {
+ Map<String, String> recordKeyMap = new HashMap<>();
+ Set<String> keySet = new TreeSet<>(recordKeys);
Review Comment:
Do we need to create a TreeSet of recordKeys? I don't think order of record
keys matters here. I believe it was there already, probably to optimize
`contains` check. But, even a simple HashSet would do right?
--
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]