kgyrtkirk commented on code in PR #17091:
URL: https://github.com/apache/druid/pull/17091#discussion_r1764482641
##########
processing/src/main/java/org/apache/druid/frame/read/columnar/StringFrameColumnReader.java:
##########
@@ -507,6 +507,20 @@ protected Comparator<Object> getComparator()
return Comparator.nullsFirst(Comparator.comparing(o -> ((String) o)));
}
+ @Override
+ public int compareRows(int rowNum1, int rowNum2)
+ {
+ ByteBuffer buffer1 = getStringUtf8(rowNum1);
+ ByteBuffer buffer2 = getStringUtf8(rowNum2);
+
+ if (buffer1 == null) {
+ return -1;
Review Comment:
this is not necessarily true ; what if `buffer2 == null` ?
you could just use a commons-lang3 for this with
https://stackoverflow.com/a/10026065/1525291
--
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]