nada-attia commented on code in PR #18941:
URL: https://github.com/apache/hudi/pull/18941#discussion_r3553619100
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -258,7 +259,10 @@ public HoodieData<HoodieRecord<HoodieMetadataPayload>>
getRecordsByKeyPrefixes(
private static TreeSet<String>
getDistinctSortedKeysForSingleSlice(HoodieData<String> keys) {
List<String> keysList = keys.collectAsList();
- return new TreeSet<>(keysList);
+ // Order by UTF-8 bytes to match the HFile order used for point lookups.
+ TreeSet<String> sortedKeys = new
TreeSet<>(StringUtils.UTF8_LEXICOGRAPHIC_COMPARATOR);
+ sortedKeys.addAll(keysList);
Review Comment:
good catch, addressed this comment by resorting in the `processFunction`
right before `lookupRecordsItr` is called
added a unit test to catch this case
`testRecordIndexBootstrapWithBinaryRecordKeysMultipleFileGroups`
--
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]