You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@druid.apache.org by GitBox <gi...@apache.org> on 2018/07/09 16:42:24 UTC

[GitHub] nishantmonu51 commented on a change in pull request #5452: SQL compatible Null Handling Part 2 - Processing Layer and Druid-SQL changes

nishantmonu51 commented on a change in pull request #5452: SQL compatible Null Handling Part 2 - Processing Layer and Druid-SQL changes
URL: https://github.com/apache/incubator-druid/pull/5452#discussion_r201070513
 
 

 ##########
 File path: processing/src/main/java/io/druid/query/aggregation/post/DoubleGreatestPostAggregator.java
 ##########
 @@ -37,14 +38,7 @@
 
 public class DoubleGreatestPostAggregator implements PostAggregator
 {
-  private static final Comparator COMPARATOR = new Comparator()
-  {
-    @Override
-    public int compare(Object o, Object o1)
-    {
-      return ((Double) o).compareTo((Double) o1);
-    }
-  };
+  private static final Comparator<Number> COMPARATOR = Comparator.nullsFirst(Comparator.comparingDouble(Number::doubleValue));
 
 Review comment:
   done.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org