Jackie-Jiang commented on code in PR #11681:
URL: https://github.com/apache/pinot/pull/11681#discussion_r1336512941


##########
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/readerwriter/ValueReaderComparisonTest.java:
##########
@@ -145,8 +156,12 @@ void testSuperiorPrefixes(ValueReader reader, int 
numBytesPerValue, String... st
           if (!Character.isLowSurrogate(chars[j])) {
             chars[j]++;
             String string = new String(chars);
-            int signum = strings[i].compareTo(string);
-            assertUtf8Comparison(reader, i, numBytesPerValue, string, 
Integer.compare(signum, 0));
+            // we can only compare if the string is the same length as the 
stored value.
+            // String constructor may compress the char array.
+            if (string.getBytes(StandardCharsets.UTF_8).length == 
numBytesPerValue) {

Review Comment:
   This is not the correct check. The input value size won't match 
`numBytesPerValue`



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