yihua commented on code in PR #13179:
URL: https://github.com/apache/hudi/pull/13179#discussion_r2051851604
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileReaderImpl.java:
##########
@@ -168,14 +168,26 @@ public int seekTo(Key key) throws IOException {
if (compareCurrent == 0) {
return SEEK_TO_FOUND;
}
- if (!isAtFirstKey()) {
- // For backward seekTo after the first key, throw exception
- throw new IllegalStateException(
- "The current lookup key is less than the current position of the
cursor, "
- + "i.e., backward seekTo, which is not supported and should be
avoided. "
- + "key=" + key + " cursor=" + cursor);
+ // compareCurrent < 0, i.e., the lookup key is lexicographically smaller
than
Review Comment:
`key.compareTo(currentDataBlockEntry.get().getFirstKey()) >= 0` is
different. This remaining part meets the condition of `compareCurrent < 0`
because previously `compareCurrent > 0` and ``compareCurrent == 0` cases are
handled.
--
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]