yihua commented on code in PR #13523:
URL: https://github.com/apache/hudi/pull/13523#discussion_r2229087129


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -631,6 +603,28 @@ private <T> ClosableIterator<T> lookupRecords(List<String> 
sortedKeys,
     }
   }
 
+  static Predicate buildPredicate(String partitionName, List<String> 
sortedKeys, boolean isFullKey) {
+    if (MetadataPartitionType.fromPartitionPath(partitionName)
+          .equals(MetadataPartitionType.SECONDARY_INDEX)) {
+      // For secondary index, always use prefix matching
+      return Predicates.startsWithAny(null,
+          sortedKeys.stream()
+          .map(SecondaryIndexKeyUtils::constructSecondaryIndexKeyPrefix)

Review Comment:
   nit: there seems to be no reason to have a separate util method here since 
the logic is one line.  Could we inline the logic here: `escapedKey + 
SECONDARY_INDEX_RECORD_KEY_SEPARATOR`?



-- 
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]

Reply via email to