vldpyatkov commented on code in PR #5895: URL: https://github.com/apache/ignite-3/pull/5895#discussion_r2108828437
########## modules/schema/src/main/java/org/apache/ignite/internal/schema/PartialBinaryTupleMatcher.java: ########## @@ -151,25 +153,20 @@ private static int compareFieldValuePartially( int index ) { switch (typeSpec) { - case BYTE_ARRAY: { - partialTuple.seek(index); + case BYTE_ARRAY: + return compareAsBytes(partialTuple, tuple2, index); - int begin = partialTuple.begin(); - int end = partialTuple.end(); - int trimmedSize = Math.min(end - begin, partialTuple.byteBuffer().capacity() - begin); + case UUID: + return compareAsUuid(partialTuple, tuple2, index); - byte[] part = partialTuple.bytesValue(begin, begin + trimmedSize); + case STRING: + return compareAsString(partialTuple, tuple2, index, false); - byte[] cmp = getTrimmedBytes(tuple2, index, part.length); + case TIMESTAMP: + return compareAsTimestamp(partialTuple, tuple2, index); - return Arrays.compareUnsigned(part, cmp); - } - case STRING: { - return compareAsString(partialTuple, index, tuple2.stringValue(index), false); - } - default: { + default: return 0; Review Comment: It is a wrong comment because a partial comparator cannot compare some types of fields. In this case the partial comparison result should be 0 to compare the fields fully. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org