linliu-code commented on code in PR #13300:
URL: https://github.com/apache/hudi/pull/13300#discussion_r2103010729
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/KeyBasedFileGroupRecordBuffer.java:
##########
@@ -77,6 +79,11 @@ public void processDataBlock(HoodieDataBlock dataBlock,
Option<KeySpec> keySpecO
try (ClosableIterator<T> recordIterator =
recordsIteratorSchemaPair.getLeft()) {
while (recordIterator.hasNext()) {
T nextRecord = recordIterator.next();
+ String recordKey = readerContext.getRecordKey(nextRecord, schema);
+ // The filter is given but record key does not pass the filter.
+ if (useFilter && !evalFilter.get().apply(recordKey)) {
Review Comment:
Eval can be expensive; so useFilter can help remove unnecessary eval calls.
--
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]