rohangarg commented on code in PR #12773:
URL: https://github.com/apache/druid/pull/12773#discussion_r932593556
##########
processing/src/main/java/org/apache/druid/query/aggregation/SerializablePairLongStringSerde.java:
##########
@@ -46,6 +46,42 @@ public class SerializablePairLongStringSerde extends
ComplexMetricSerde
{
private static final String TYPE_NAME = "serializablePairLongString";
+ private static final Comparator<SerializablePairLongString> COMPARATOR =
(o1, o2) -> {
+ int comparation;
+
+ // First we check if the objects are null
+ if (o1 == null && o2 == null) {
+ comparation = 0;
+ } else if (o1 == null) {
+ comparation = -1;
+ } else if (o2 == null) {
+ comparation = 1;
+ } else {
Review Comment:
thanks for the pointer, re-wrote the comparators in a consice manner :+1:
regarding the ingestion part, I've kept the ingestion comparator to be the
same as before. Further, I'm not sure if we provide ability to order rows by
metric values. In any case, I think the effect should only be at query time.
--
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]