codope commented on code in PR #8758: URL: https://github.com/apache/hudi/pull/8758#discussion_r1232168973
########## hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java: ########## @@ -163,16 +160,16 @@ public List<String> getPartitionPathWithPathPrefixes(List<String> relativePathPr public HoodieData<HoodieRecord<HoodieMetadataPayload>> getRecordsByKeyPrefixes(List<String> keyPrefixes, String partitionName, boolean shouldLoadInMemory) { - // Sort the columns so that keys are looked up in order + // Sort the prefixes so that keys are looked up in order List<String> sortedKeyPrefixes = new ArrayList<>(keyPrefixes); Collections.sort(sortedKeyPrefixes); // NOTE: Since we partition records to a particular file-group by full key, we will have // to scan all file-groups for all key-prefixes as each of these might contain some // records matching the key-prefix - List<FileSlice> partitionFileSlices = - HoodieTableMetadataUtil.getPartitionLatestMergedFileSlices( - metadataMetaClient, metadataFileSystemView, partitionName); + List<FileSlice> partitionFileSlices = partitionFileSliceMap.computeIfAbsent(partitionName, Review Comment: +1 we should fix other partitions in followup https://issues.apache.org/jira/browse/HUDI-6398 -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org