hudi-agent commented on code in PR #19021:
URL: https://github.com/apache/hudi/pull/19021#discussion_r3421569573
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileDataBlock.java:
##########
@@ -132,11 +149,13 @@ int seekTo(HFileCursor cursor, Key key, int
blockStartOffsetInFile) {
return isAtFirstKey(relativeOffset) ? SEEK_TO_BEFORE_BLOCK_FIRST_KEY :
SEEK_TO_IN_RANGE;
}
long increment =
- (long) KEY_OFFSET + (long) kv.getKeyLength() + (long)
kv.getValueLength()
+ (long) KEY_OFFSET + (long) IOUtils.readInt(byteBuff, relativeOffset)
Review Comment:
🤖 nit: could you extract these two `readInt` calls into named locals (e.g.
`entryKeyLength` / `entryValueLength`) before computing `increment`? The
original `kv.getKeyLength()` / `kv.getValueLength()` were self-documenting; the
raw offset reads here require tracing back to the layout comment ~30 lines
earlier to understand what each one returns.
<sub><i>- AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]