the-other-tim-brown commented on code in PR #18015:
URL: https://github.com/apache/hudi/pull/18015#discussion_r2747744802


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bloom/HoodieBloomIndexCheckFunction.java:
##########
@@ -102,26 +103,24 @@ protected List<HoodieKeyLookupResult> computeNext() {
             keyLookupHandle.addKey(recordKey);
           } else {
             // do the actual checking of file & break out
-            ret.add(keyLookupHandle.getLookupResult());
+            HoodieKeyLookupResult result = keyLookupHandle.getLookupResult();
             keyLookupHandle = new HoodieKeyLookupHandle(config, hoodieTable, 
partitionPathFilePair);
             keyLookupHandle.addKey(recordKey);
-            break;
+            return result;
           }
         }
 
-        // handle case, where we ran out of input, close pending work, update 
return val
-        if (!inputItr.hasNext()) {
-          ret.add(keyLookupHandle.getLookupResult());
-        }
+        // handle case, where we ran out of input, close pending work, return 
result
+        HoodieKeyLookupResult result = keyLookupHandle.getLookupResult();

Review Comment:
   If it is empty, hasNext should return false immediately



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