nishantmonu51 commented on a change in pull request #5957: Renamed 'Generic 
Column' -> 'Numeric Column'; Fixed a few resource leaks in processing; Fixed a 
bug in SingleStringInputDimensionSelector; misc refinements
URL: https://github.com/apache/incubator-druid/pull/5957#discussion_r208029395
 
 

 ##########
 File path: 
processing/src/main/java/io/druid/query/aggregation/first/DoubleFirstAggregatorFactory.java
 ##########
 @@ -49,15 +47,11 @@
 
 public class DoubleFirstAggregatorFactory extends 
NullableAggregatorFactory<ColumnValueSelector>
 {
-  public static final Comparator VALUE_COMPARATOR = (o1, o2) -> 
Doubles.compare(
-      ((SerializablePair<Long, Double>) o1).rhs,
-      ((SerializablePair<Long, Double>) o2).rhs
-  );
+  public static final Comparator VALUE_COMPARATOR =
+      Comparator.comparingDouble(o -> ((SerializablePair<Long, Long>) o).rhs);
 
-  public static final Comparator TIME_COMPARATOR = (o1, o2) -> Longs.compare(
-      ((SerializablePair<Long, Object>) o1).lhs,
-      ((SerializablePair<Long, Object>) o2).lhs
-  );
+  public static final Comparator TIME_COMPARATOR =
+      Comparator.comparingLong(o -> ((SerializablePair<Long, Long>) o).lhs);
 
 Review comment:
   should this be SerializablePair<Long, Object> instead of 
SerializablePair<Long,Long> ? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to