danny0405 commented on code in PR #9037:
URL: https://github.com/apache/hudi/pull/9037#discussion_r1238245363


##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieAvroHFileReader.java:
##########
@@ -267,14 +263,14 @@ private static Iterator<IndexedRecord> 
getRecordByKeyPrefixIteratorInternal(HFil
     //
     // Consider entries w/ the following keys in HFile: [key01, key02, key03, 
key04,..., key20];
     // In case looked up key-prefix is
-    //    - "key", `seekTo()` will return -1 and place the cursor just before 
"key01",
+    //    - "key", `reseekTo()` will return -1 and place the cursor just 
before "key01",
     //    `getCell()` will return "key01" entry
-    //    - "key03", `seekTo()` will return 0 (exact match) and place the 
cursor just before "key03",
+    //    - "key03", `reseekTo()` will return 0 (exact match) and place the 
cursor just before "key03",
     //    `getCell()` will return "key03" entry
-    //    - "key1", `seekTo()` will return 1 (first not lower than) and place 
the cursor just before
-    //    "key10" (i.e. on "key09");
+    //    - "key1", `reseekTo()` will return 1 (first not lower than) and 
leave the cursor wherever it was just before calling
+    //    reseekTo();
     //
-    int val = scanner.seekTo(kv);
+    int val = scanner.reseekTo(kv);

Review Comment:
   I'm actually a little confused by the `reseekTo` document,
   
   ```java
   @return -1, if cell &lt; c[0], no position;
      * 0, such that c[i] = cell and scanner is left in position i; and
      * 1, such that c[i] &lt; cell, and scanner is left in position i.
   ```
   It seems the for return value -1, there is no move in cursor, but for 1 the 
cursor would move right before the nearest key cell that has a key greater than 
the current key.



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