deniskuzZ commented on code in PR #6747:
URL: https://github.com/apache/hive/pull/6747#discussion_r3940778474


##########
serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java:
##########
@@ -402,105 +453,248 @@ public String getDetailedReadPositionString() {
       sb.append(" at field start position ");
       sb.append(startPositions[currentTopLevelFieldIndex]);
       int currentFieldLength = startPositions[currentTopLevelFieldIndex + 1] -
-          startPositions[currentTopLevelFieldIndex] - 1;
+          startPositions[currentTopLevelFieldIndex] - topLevelSeparatorLen;
       sb.append(" for field length ");
       sb.append(currentFieldLength);
     }
 
     return sb.toString();
   }
 
+  /**
+   * Bytes at {@code buf[off..off+dlen)} equal to {@code delim[0..dlen)}?
+   *
+   * Caller has already checked {@code buf[off] == delim[0]}, so we start at
+   * index 1 — this is only ever invoked when the first byte matched, which
+   * keeps the multi-byte hot loop from paying for a tail compare on every
+   * mismatching input byte.
+   */
+  private static boolean matchesAt(byte[] buf, int off, byte[] delim, int 
dlen) {

Review Comment:
   naming could be improved, lacks context. 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to